Skip to content

Recover Deleted Files from a Network Share Before You Scan

Why undelete tools find nothing on mapped drives, the right recovery order, and how our File Server adds recycle bin, versions and backups.

Summary in your language
In this article 13 sections
File Server · Recover Deleted Files from a Network Share · Localtonet · 2026

The deleted file is on the server, so the rescue has to start there too

You delete a folder from a mapped drive and run an undelete tool against that drive letter. The scan finds nothing. That result is expected. On a network share the deletion happens on the server's filesystem, and your client never had access to the disk blocks a recovery tool needs to read. This guide explains why, for SMB shares, WebDAV mounts and SFTP folders. It gives you a recovery order to follow before any scan: server-side trash, version history, backups and snapshots, and only then raw disk recovery on the host. The second half shows how our File Server, shared through a Localtonet tunnel, gives you several undo points, which users can actually reach them, and how per-user roles stop the next accidental deletion.

🔒 Per-user Admin, Read, Create, Delete and Share roles 🌐 Default web manager, SFTP and WebDAV types ⚡ Recycle bin, version history and scheduled backup snapshots

Why undelete tools find nothing on a mapped network drive

Diagram showing a deleted file stored on the file server host disk while the client's mapped drive undelete tool finds nothing
Files deleted on a mapped drive are removed on the server's disk, so client-side undelete tools have nothing local to scan.

Desktop recovery tools work at a level below files. When a local filesystem such as NTFS, ext4 or APFS deletes a file, it usually does not wipe the file's contents right away. It removes or marks the directory entry and returns the file's blocks to the pool of free space. A recovery tool reads the raw block device, finds metadata records or recognizable file signatures in that free space, and reassembles what it can. For that to work, the tool needs direct, low-level read access to the disk that held the file.

A mapped network drive does not give you that access. When you open Z:\ on Windows, a mounted share in Finder, or a WebDAV or SFTP folder in a file manager, your operating system is talking to a remote server through a file-level protocol. Your machine sends requests such as "list this directory", "read this file" or "delete this path". The server performs those operations on its own filesystem, on its own disks. Your client never sees the server's block device, its free space map or its filesystem journal. The drive letter is a view of files, not a view of storage.

That is why pointing a recovery utility at a network drive letter is a dead end. Many tools will not even list a network drive as a scannable volume, and the ones that accept a path can only see the files that still exist, because the protocol only exposes live files. The deleted data, if it still exists anywhere, lives in one of four places:

  • A trash or recycle bin that the server software maintains.
  • A version history store that kept earlier copies of the file.
  • A backup or filesystem snapshot taken before the deletion.
  • The free space of the server's own disk, where the old blocks may not have been overwritten yet.

Notice what is missing from that list: your local Recycle Bin. Microsoft documents that files deleted from a network share are not moved to the client's Recycle Bin, which is why Explorer asks whether you want to delete the item permanently. macOS Finder typically warns that items on a network volume will be deleted immediately. Unless the server itself keeps deleted items, there is no client-side safety net at all.

The core rule of network-share recovery

Recovery must happen where the deletion happened. Every useful action in this guide takes place on the server or on a copy the server produced. Scanning the client's own disk only makes sense if the file also existed locally, for example in a sync client's cache or a recent download, and that is a separate recovery problem.

The first hour: stop new writes before you do anything else

Freed blocks are fair game for the filesystem. The longer a volume keeps accepting data after a deletion, the more likely it is that a new file, a journal entry or an index update lands exactly where your lost content used to be. This only matters for the last resort, raw disk recovery, but it matters a lot there, and you cannot undo an overwrite later. So the goal of the first hour is simple: reduce the write rate on the affected volume to as close to zero as you can, without destroying the options that do not depend on free space.

Reading from the trash, browsing version history and opening backups are low-impact actions. You can and should do them early. What you want to cut off are the sources of sustained writing.

Three sources of writes to cut off

People. Send a short message to everyone who uses the share asking them to stop saving to it until further notice. If you cannot reach everyone, consider making the share read-only for them, which with our File Server means removing the Create and Delete roles from those users and saving.

Automation that targets the share. Mirroring clients, backup jobs that write into the same volume, import tools for photos or media, recording software, download managers and deployment scripts all generate steady traffic. A two-way sync client deserves special attention: it may notice the deletion and replay it onto the other copies you were counting on.

The server itself. Even an idle server writes. Search indexers, thumbnail generators, virus scanners, log files, package update agents, container volumes and virtual machine disks stored on the same filesystem all keep the disk busy. Pause what you can, and keep a note of what you stopped so you can bring it back afterwards.

Well-meant actions that make things worse

Some reflexes feel like repair but reduce your chances. Filesystem checks such as chkdsk or fsck are designed to make a damaged structure consistent, not to bring back deleted entries, and they may rewrite exactly the metadata a recovery tool would need. The same applies to defragmentation, trimming and optimization jobs, reformatting, and rebuilding or resyncing an array. Installing a recovery program onto the affected volume, or saving anything it finds back onto that volume, uses the very space you are trying to read. And when you eventually restore from a snapshot, resist rolling back an entire folder or volume to retrieve one file, because a rollback also erases every legitimate change made since that point in time.

Incident notes worth taking now

Five minutes of notes will save you guesswork in every later step. Answer these questions while memories are fresh:

  • What and where? The full path of the missing file or folder, and roughly how much data it was.
  • When? The latest time it is known to have existed and the earliest time it was noticed missing. This window decides which snapshot or backup you choose.
  • How? The access path used: a mapped SMB drive, a WebDAV mount, an SFTP client or script, a web interface, or a command run directly on the server. Trash features often watch only some of these paths.
  • On what storage? The filesystem type the share sits on, whether the disk is an SSD or a spinning drive, whether it is a single disk or part of an array or pool, and whether it is encrypted. These facts decide whether raw recovery is even realistic.
Failing hardware is a different problem

If the server's drive is clicking, disconnecting, or reporting serious SMART or I/O errors, stop. Every extra read can make physical damage worse. Power the machine down cleanly and treat it as a hardware recovery case: image the disk with a tool built for failing media, or hand it to a professional recovery service if the data is critical and you have no other copy.

The recovery order: cheapest and safest first

Numbered flow of four recovery layers from recycle bin to previous versions, backup restore and raw disk recovery
Try recovery layers in order of cost and risk, leaving raw disk recovery for last.

The order below is built around where a copy might still exist, starting with the options that are fastest and that cause no further risk to the data. Move to the next layer only when the current one has been checked and come up empty. The middle column is the important one: every layer except raw recovery depends on a decision someone made before the deletion.

Layer What it holds Must already have been true Cost of trying
1. Server-side trash Recently deleted items, usually with names and paths The bin was enabled for the share, and the deletion went through an access path it watches Minutes; read-only browsing
2. Version history Earlier contents of files that were overwritten or damaged Versioning was on, and the platform keeps versions after the file itself is removed Minutes; read-only browsing
3. Backups and snapshots Point-in-time copies of folders or whole volumes A copy was taken while the file existed and is still within retention Minutes to hours; restore to a staging location
4. Raw disk recovery Fragments in the host disk's free space Only that the blocks were not overwritten, trimmed or encrypted beyond reach Hours; needs downtime, an image and spare storage; names often lost
5. Professional recovery Whatever a lab can read from the physical drives Nothing, though physical damage can still limit results Money and days; the right choice for failing hardware and critical data

Layer 1: the server-side trash

A server-side recycle bin intercepts delete requests and moves the item somewhere recoverable instead of unlinking it. NAS operating systems usually implement this per shared folder, often as a hidden folder inside the share. Self-hosted platforms keep a trash area in their own data directory. Windows Server does not keep a recycle bin for files deleted over SMB by default, which is one reason administrators enable Shadow Copies instead.

On a plain Linux server running Samba, the equivalent is the vfs_recycle module. The Samba manual page for vfs_recycle describes it as intercepting file deletion requests and moving the affected files to a temporary repository rather than deleting them immediately. A minimal share definition looks like this:

[projects]
   path = /srv/share/projects
   read only = no
   vfs objects = recycle
   recycle:repository = .recycle
   recycle:keeptree = yes
   recycle:versions = yes
   recycle:touch = yes
   recycle:exclude = *.tmp

Here recycle:repository sets the folder that receives deleted items, relative to the share root (.recycle is also the module's default). recycle:keeptree preserves the original directory structure inside the repository, recycle:versions keeps multiple copies when files with the same name are deleted more than once, recycle:touch updates the access time of a recycled file so it can be aged out by date, and recycle:exclude skips matching files such as temporary documents. Two limitations follow from how the module works. It only sees deletions made through Samba, so a rm run on the server or a change made over NFS bypasses it. And it does not purge anything by itself, so you need a scheduled job that removes old items from the repository, or the bin will eventually fill the disk.

Whatever platform you use, three things decide whether the trash can help. The feature must have been enabled before the deletion; enabling it now will not bring anything back. The deletion must have gone through a path the bin watches. And the item must still be inside the retention period and size limit, and the bin must not have been emptied. When you restore, put the item back in its original location only if nothing new has been saved at that path since. Otherwise restore into a separate folder and compare.

Layer 2: version history

Version history solves a slightly different problem than the trash. It protects against overwrites: a document saved with the wrong content, a spreadsheet emptied by a bad macro, a config file truncated by a script. If your problem is "the file is there but it is wrong", version history is the first place to look, often before the trash.

Whether version history helps after a full deletion depends on the platform. On some systems, versions are attached to the file and disappear with it unless the file is restored from the trash first. On others, version stores are kept separately. If you have both a trash and version history, restore the file from the trash first, then browse its versions.

Layer 3: backups and snapshots

Backups and snapshots are the layer that protects against everything else: deletions that bypassed the trash, emptied bins, expired retention, and ransomware that encrypted files in place. The key question is always timing. A nightly backup cannot hold a file that was created in the morning and deleted in the afternoon. A backup that runs every few minutes or reacts to file changes can.

Filesystem snapshots on the server are a common form of this layer. The OpenZFS documentation describes snapshots as read-only copies of a dataset at a point in time, and exposes them through a hidden .zfs/snapshot directory at the root of each dataset's mountpoint. Whether that directory shows up in listings is controlled by the dataset's snapdir property, but you can open it by path either way. To see which snapshots exist:

zfs list -t snapshot

Pick the latest snapshot dated before the deletion, browse into .zfs/snapshot/<name>/ under the dataset's mountpoint, and copy the single file you need to a safe location. Because ZFS snapshots are read-only, browsing them cannot alter the copy.

On Btrfs, snapshots are subvolumes, and you can list them with:

sudo btrfs subvolume list -s /mnt/pool

Replace /mnt/pool with the mountpoint of your Btrfs filesystem. Btrfs snapshots are only read-only if they were created that way, so copy files out of them rather than editing inside them.

On Windows file servers, the Shadow Copies of Shared Folders feature lets clients reach snapshots through the Previous Versions tab that Microsoft documents for files and folders. A deleted file has no Properties dialog of its own, so start one level higher: open the Properties of the folder that used to contain it, go to Previous Versions, open a version from before the loss, and drag the file you want into a different location. Using the Restore button on that folder instead replaces the folder's current contents with the older state, which is rarely what you want for a single file.

For off-machine backups (object storage, an FTP or SFTP server, another NAS), browse the backup by date, pick the latest snapshot that predates the deletion, and restore to a staging folder first. Verify the file opens correctly before moving it into place.

Snapshots on the same disk are not backups

A snapshot on the server's own filesystem protects against deletion and overwrites, but not against the disk failing, the server being stolen, or an attacker with admin rights deleting the snapshots too. Treat local snapshots as a fast undo layer and keep at least one copy on separate storage.

Layer 4: raw disk recovery on the host, done safely

If the trash, versions, snapshots and backups all fail, the only remaining chance is the free space on the server's own disk. This is the step that undelete software is actually built for, but it must run against the server's storage, not against the network drive on your laptop. It also needs to happen with the volume no longer accepting writes.

Take the volume out of service

Stop whatever serves the share. On a Linux server running Samba, the service is usually called smbd on Debian and Ubuntu and smb on Fedora and RHEL family systems:

sudo systemctl stop smbd

If the share is served by something else, such as a WebDAV server, an SFTP daemon or a file server application, stop that process too. With our File Server, select Stop on the tunnel so that no remote user can reach the folder, and then close the Localtonet client if nothing else on that machine depends on it. Then check whether anything still has files open on that filesystem:

sudo lsof +f -- /srv/share

Once nothing is writing, remount the filesystem read-only. This fails if a process still has a file open for writing, which is a useful check in itself:

sudo mount -o remount,ro /srv/share

Replace /srv/share with your actual mountpoint. If the deleted data lived on the system disk, you cannot cleanly make the root filesystem read-only on a running system. In that case shut the machine down and boot from separate media, or move the disk to another computer and attach it without mounting it.

Image first, scan the image

Scan a copy, not the original. Imaging the disk to separate storage means a failed or slow recovery attempt cannot make things worse, and you can try several tools against the same image. The GNU ddrescue manual describes the tool as a data recovery copier that records its progress in a mapfile, so an interrupted run can resume without starting over and later passes only retry the areas that failed. A common two-pass approach is a quick first pass that skips the slow scraping of difficult areas:

sudo ddrescue -n /dev/sdX /mnt/external/disk.img /mnt/external/disk.map

followed, if the first pass reported errors, by a second pass that retries the bad areas a few times using the same mapfile:

sudo ddrescue -d -r3 /dev/sdX /mnt/external/disk.img /mnt/external/disk.map

Replace /dev/sdX with the correct source device and make sure the destination is on a different physical disk with enough free space for the whole image. Getting the source and destination backwards will destroy data, so double-check device names with lsblk before running anything.

Then run recovery tools against the image. The PhotoRec documentation explains that it ignores the filesystem and searches the underlying data for known file signatures, which is why it still works when metadata is gone, and why it can read disk image files directly. The trade-off is that carved files come back with generated names in numbered output folders rather than their original names and paths. Filesystem-aware tools can sometimes restore names and paths when metadata survived. Write recovered files to a third location, never back onto the disk the image came from.

When raw recovery is unlikely to work

  • SSDs with TRIM. When the operating system tells an SSD that blocks are free, the drive may erase them internally. Deleted data on a TRIM-enabled SSD is often gone within a short time.
  • Encrypted storage. If the data was encrypted at rest, recovered blocks are ciphertext. Without the key, carving tools cannot recognize or use them.
  • RAID and pooled storage. On a multi-disk array, data is spread across members. Recovery needs either the assembled array or images of every member plus the correct layout.
  • Busy volumes. If the share stayed in heavy use for days after the deletion, much of the freed space may already be reused.

How SMB, WebDAV and SFTP handle deletion

Comparison of SMB, WebDAV and SFTP showing delete requests removing files directly on the server
SMB, WebDAV and SFTP all perform deletes on the server without a client-side recycle bin.

The protocol used to delete a file does not change where the data lived, but it does affect whether a server-side trash catches the deletion and what the client shows you. All three are file-level protocols, so in every case the client sends a request and the server carries it out.

Protocol What the client sends Client-side recycle bin What decides recoverability
SMB (mapped drive, Finder share) A request to delete the file on the server Normally none; Windows and macOS warn that the delete is permanent Whether the server keeps a per-share trash (for Samba, vfs_recycle), snapshots or backups
WebDAV (mounted network drive) An HTTP DELETE request for the resource Normally none Whether the WebDAV server software moves deleted items to a trash or keeps versions
SFTP (FileZilla, WinSCP, rsync, scripts) A remove operation executed by the SFTP server None; many SFTP clients ask for confirmation, then delete permanently Whether anything on the server side intercepts removals, plus backups and snapshots
Web file manager An application-level delete action Not applicable Whether the application has a recycle bin and version history, and whether the signed-in user may use them

The practical takeaway: a trash implemented inside one service only sees deletions made through that service. Samba's recycle module does not see SFTP removals, and a web application's bin does not see files removed from the disk by a shell command. Before you rely on a recycle bin, find out which access paths it covers. Automation is the usual blind spot. Sync scripts with a "delete extra files" option, such as rsync --delete run against an SFTP target, can remove large numbers of files in seconds, and they often never pass through a trash.

How our File Server gives you layered undo points

Isometric illustration of a file server with recycle bin, versions and backup layers and a remote client connected through a tunnel
Recycle bin, versions and backups provide separate restore points before raw disk recovery is needed.

With Localtonet, File Server is a tunnel type that publishes a local folder rather than an IP address and port. The Localtonet client on your machine makes an outbound connection to our relay server, and the folder becomes reachable at a public address without port forwarding or a public IP. You do not need to install a separate web, SFTP or WebDAV server; the Localtonet client serves the folder itself. The tunnel is available only while the client is connected and the tunnel is running.

You choose one of three types when you create the tunnel:

  • Default: a browser-based file manager at https://<ADDRESS>. Visitors sign in with a user you created under Manage Permissions. No client software is needed on the visitor's side.
  • SFTP: standard SFTP access at sftp://<ADDRESS>:<PORT> for FileZilla, WinSCP, rsync, CI/CD and other automation, using a username and password from Manage Permissions.
  • WebDAV: a WebDAV address at https://<ADDRESS> that can be mounted as a network drive in File Explorer on Windows or Finder on macOS, again signing in with a Manage Permissions account.

The Default web file manager includes several features that map directly onto the recovery layers above. Here is how they line up.

🗑️ Recycle bin The Default file manager includes a recycle bin, giving you a layer 1 undo point for items deleted through it. Users with a Restricted Path cannot use it.
🕘 Version history with diff Earlier versions of a file are kept and can be compared with a diff, which covers overwrites and bad edits rather than only deletions.
☁️ Built-in backup engine Backs up to S3, S3-compatible storage, FTP or SFTP, with encrypted credentials and payloads, exponential backoff retry and snapshot retention.
⏱️ Scan plus change debounce The backup engine runs a full scan every 30 minutes and reacts to file changes after a 45-second debounce, so new files are picked up quickly.
🛡️ Per-user Delete role Each user gets their own roles: Admin, Read, Create, Delete and Share. Leave Delete unticked for anyone who does not need it, and changes take effect when you save.
📨 Signed delete webhooks File-event webhooks fire on upload, delete, rename and move, with an optional path filter and HMAC signing for an audit trail.

Why the backup timing matters for recovery

The weak spot of most backup schedules is the gap between runs. A file created after last night's backup and deleted this afternoon exists in no backup at all. Our File Server's backup engine narrows that gap in two ways. The full scan every 30 minutes catches anything that was missed, and the 45-second debounce on file changes means that once a file stops changing, it is queued for backup shortly after rather than waiting for the next scheduled window. The debounce also avoids backing up a file repeatedly while it is still being written.

Snapshot retention is what turns a backup into a recovery tool. A plain mirror that copies deletions to the destination would lose the file there too. Retained snapshots keep earlier states available so you can pick the one from before the deletion. Exponential backoff retry means a temporary failure at the destination, such as a network outage or a briefly unavailable storage endpoint, does not quietly end the backup attempt; the engine tries again with increasing delays.

What we have not documented yet

Our published material does not state the default number of snapshots retained, how long items stay in the recycle bin, or the exact restore steps in the interface. Check the backup and recycle bin settings in your File Server before an incident so you know your actual retention, and run a test restore from your backup destination to confirm the snapshots contain what you expect.

Who can reach the undo layers

Our File Server documentation is explicit about one limitation that changes how you plan recovery. A user on a Default tunnel who has a Restricted Path works only inside that folder. They can browse, search, preview, download, upload, create folders, copy, move, rename, delete and create share links there, as far as their roles allow. The other parts of the file manager are not available to them: the recycle bin, file versions, tags, archives, encrypted and private folders, full-text search, the document viewer, task boards, photo backup, backups, and user and server administration.

Restricted users cannot restore what they delete

If a user with a Restricted Path deletes a file, that user cannot open the recycle bin, browse file versions or reach backups to get it back. Recovery has to be done by a user without a Restricted Path, in practice an Admin user. Make sure at least one such account exists and that someone you trust holds its credentials before you hand restricted accounts to other people. Our documentation lists which features restricted users lose; it does not spell out which role an unrestricted user needs for each recovery feature, so an Admin account is the safe choice.

Mapping File Server features to the recovery order

If you share a folder through our File Server and something is deleted, the recovery order from earlier still applies, with File Server features filling the first three layers. Sign in as an unrestricted or Admin user, then:

  1. Check the File Server recycle bin for the deleted item.
  2. If the file exists but its content is wrong, open its version history and compare versions with the diff view before restoring.
  3. If neither has it, go to your backup destination (your S3 bucket, S3-compatible store, FTP or SFTP server) and restore from a snapshot that predates the deletion, ideally into a staging folder first.
  4. Only if all three fail, fall back to raw disk recovery on the machine that holds the shared folder, using the read-only and imaging procedure above.
Verify recycle bin and version history for SFTP and WebDAV

Our documentation describes the recycle bin and file versions as parts of the Default file manager. It does not say whether deletions made through the SFTP or WebDAV types are caught by them. Until you have confirmed this on your own setup, assume that a file deleted through an SFTP client, an rsync job or a mounted WebDAV drive may not be recoverable from the recycle bin, and make sure the backup layer covers that folder.

A simple way to check is to create a throwaway test file, delete it through the type you use, and then look for it in the recycle bin and version history while signed in as an Admin user. Do this before real data depends on it, not during an incident.

How to set up a File Server tunnel

The setup follows our File Server documentation. Before you start, two things must be in place:

  • The Localtonet client is running on the device that holds the folder and is connected with an AuthToken. Keep that token private.
  • You know the full path of the folder you want to share.

You do not need to install a web, SFTP or WebDAV server. Once those prerequisites are met, the documented sequence has five steps.

1

Open the File Server page

In the dashboard, open My Tunnels › File Server and expand Create File Server Tunnel.

2

Fill in the form

Choose the URL type: Random subdomain, Custom subdomain or Custom domain (custom subdomains and custom domains need Balance). Select the Device token of the device that holds the folder and a Server region close to that device. Pick the type: Default, SFTP or WebDAV, with Default selected at first. Fill in the Subdomain and Domain fields for Custom subdomain, or the Domain field for Custom domain, where they are shown. Finally enter an absolute Folder path on that device.

3

Select Create tunnel

The tunnel appears under Your tunnels. Creating it does not start it yet, and no one can sign in until you add users.

4

Add the people who may sign in

In the Permissions column select Manage, add at least one user with a Username, a Password and the roles they need, then select Save Changes. Create your Admin account here first, so recovery features stay reachable later.

5

Select Start

The URL column shows the public address. For an SFTP tunnel it is shown as sftp://<ADDRESS>:<PORT>; click it to copy it. Open or connect to the address and sign in to confirm the folder is reachable.

Folder path rules

The path is required, and it must be a folder on the device whose token you selected. Share the narrowest folder that does the job, because everything below it becomes reachable to users without a Restricted Path.

Device Path format Examples
Windows A full path including the drive letter C:\Users\Work, C:\Shared
Linux A full path from the root /root, /usr/share, /home/user/shared
Mobile The entered path is ignored A mobile device always shares the Localtonet app's own directory

To change the folder later, select the edit icon next to the path in the Path column, enter the new path and select Submit. If the tunnel is running, it is stopped and started again with the new path, so expect connected users to be interrupted briefly. Be careful doing this during a recovery: pointing the tunnel at a staging folder is a valid way to let people check restored files, but it also changes what every user sees.

Custom domains

If you choose Custom domain, update the DNS settings of the domain before you create the tunnel. Our documentation describes two ways: point the domain to the ns1.localtonet.com and ns2.localtonet.com nameservers, or create a CNAME record. Our custom domains documentation explains both in detail; follow it for the exact record values rather than guessing them.

Once the tunnel is running, configure the recovery layers before anyone else starts using the share: set up the backup destination, review user roles, and confirm where deleted items go. For a broader tour of the web manager, see our post on the Localtonet File Server, our walkthrough on how to use File Server, and the overview of secure File Server tunnels with the Default, SFTP and WebDAV types. Some of those earlier posts use the older "Process Type" label; the current form calls the same choice URL type.

Choosing a backup destination

The backup engine supports S3, S3-compatible storage, FTP and SFTP. The general principle for recovery is separation: the destination should be on different hardware, ideally in a different location, from the machine holding the shared folder. A backup on a second partition of the same disk does not survive that disk failing. If you use object storage, consider whether the bucket itself has versioning or deletion protection, so that compromised credentials cannot delete your snapshots; that protection is a feature of your storage provider, not of File Server, so check what your provider offers.

Backup credentials are stored encrypted by the engine, and payloads are encrypted too. Even so, give the backup account the minimum permissions it needs on the destination, and use a dedicated account rather than your main storage credentials. Remember that backups are among the features restricted users cannot reach, so configure and test them from an Admin account.

Prevent accidental deletion with per-user roles

The cheapest recovery is the one you never need. Most accidental deletions on shared folders happen because more people, devices and scripts have delete rights than actually need them. File Server lets you control that per person.

Access is managed in the Manage Permissions dialog, opened with Manage in the Permissions column. Each user is a card with these fields:

Field or role What it does Why it matters for deletions
Username The sign-in name; each username can be used only once per tunnel, and a card without one is not saved Separate accounts mean you can tell who did what and change one person's access without touching others
Password The sign-in password On Default tunnels it cannot be changed later; remove the user and add them again instead
Restricted Path Optional; limits the user to a sub-path such as /documents Contains the blast radius, but on Default the user also loses the recycle bin, versions and backups
Admin Full access; ticking it ticks every other role, and clearing any other role clears it Keep at least one Admin for recovery work and give the role to as few people as possible
Read View and download Enough for people who only consume files
Create Upload files and create folders; in the Default file manager it also allows renaming A rename can make a file look deleted, so Create is not entirely harmless
Delete Delete files and folders The role to withhold wherever it is not genuinely needed
Share Create share links in the Default file manager Lets someone distribute files without giving recipients an account

Each card's header summarizes the user's roles or shows No permissions, which makes it easy to scan for over-privileged accounts. A change to a user's roles takes effect when you select Save Changes, and removing a user with the bin icon ends their access on save. You do not need to restart the tunnel.

Restricted Path details

Write the Restricted Path as folder names separated by /. A value that contains .., a drive letter or : gives the user no access at all, and on a Linux device the names are case-sensitive. How the restriction appears depends on the type: on Default the user works only inside that folder, on SFTP the folder becomes the user's root directory, and on WebDAV the user connects to https://<ADDRESS>/<PATH>/, for example https://<ADDRESS>/documents/.

A note on older descriptions of File Server permissions

Some of our earlier blog posts described permissions as global flags (Upload, Download, Delete, Create Folder, Move, Share) with per-path overrides. The current Manage Permissions dialog documented on our File Server page works per user, with the roles Admin, Read, Create, Delete and Share and an optional Restricted Path. There is no separate Move role in the current documentation, so do not plan around a Move toggle. Use per-user roles and Restricted Path as described here.

Practical role patterns

  • Consumers. People who only need to open or download files get Read and nothing else.
  • Contributors without delete rights. People who submit files get Read and Create but not Delete, so they can add work without removing anyone else's. Remember that on Default, Create also allows renaming.
  • Scoped collaborators. Give an outside collaborator a Restricted Path to the one folder they work in, such as /incoming. They cannot touch the rest of the share, but they also cannot reach the recycle bin, versions or backups, so an unrestricted account must handle any recovery for them.
  • Automation accounts. Give each SFTP or WebDAV script its own user. Grant Delete only to the one job that genuinely prunes files, ideally with a Restricted Path to the folder it manages.
  • A small Admin group. Keep Admin for the people responsible for restores and settings.

Incident lockdown

When a deletion is discovered, the fastest way to prevent further damage without taking the share offline is to open Manage Permissions, clear the Delete role from every user who does not need it during the investigation, and select Save Changes. The change takes effect when you save. If a specific account looks compromised or a script is misbehaving, remove that user entirely. If you need the share fully frozen, for example before raw recovery, select Stop on the tunnel instead.

Extra locks and password handling

Default tunnels have one more layer: Basic Authentication in the tunnel's Settings. Turn on Basic Authentication? and enter a username and password, and visitors must pass that check before the file manager's own sign-in page appears. SFTP and WebDAV tunnels do not offer this switch; their users always sign in with the accounts from Manage Permissions.

Existing passwords on Default tunnels cannot be changed; the field shows Cannot be changed. For a forgotten password, remove the user and add them again. In the Default file manager, a new user is asked to choose a new password the first time they sign in, so tell people to expect that prompt.

Sharing without handing out delete rights

Often the reason people get broad access to a folder is that someone needs to send or receive a few files. Public share links are a narrower alternative. A user with the Share role can create a link with an expiry date, a download limit and its own password. Recipients get the file without needing an account on the share at all.

Exposure and access control

A File Server tunnel makes a folder reachable from the internet while it runs. Publish only the folder you need, keep roles as narrow as possible, use strong passwords for every user and for share links, add Basic Authentication on Default tunnels where it fits, and stop the tunnel when it is no longer needed. Our File Server includes path-traversal protection, per-IP rate limiting and blocked executable extensions, but these defaults do not replace deliberate access decisions.

Build an audit trail with delete webhooks

During an incident, the first question is usually "what exactly was deleted, and when?" Without a record, you are guessing at deletion times, which makes picking the right snapshot harder. File Server's file-event webhooks fill this gap. They fire on upload, delete, rename and move events and send the event to an HTTP endpoint you control. You can add an optional path filter so you only receive events for the folders you care about, and HMAC signing lets your receiver confirm that a request really came from your File Server and was not forged or altered.

A minimal audit setup looks like this in practice: a small receiver that verifies the HMAC signature, then appends each event to a log or database somewhere other than the shared folder. When something goes missing, you can search that log for the path, see the timestamp of the delete event, and choose the latest backup snapshot from before that time. Rename and move events help too, because they often explain files that seem to have vanished but were only relocated.

Our published posts do not list the exact payload fields, signature header name or hash algorithm for File Server webhooks, so check those details in the webhook settings when you build your receiver rather than assuming a format. Always verify the signature before trusting an event.

Do not confuse this with tunnel webhooks

We also have a separate, platform-wide webhook system covered in our webhook documentation. It fires when a token or tunnel in a selected Token Group changes to Connected or Disconnected, and posts a JSON body with Id, ActionDate, Type and Status. It does not report file events. It is still useful here: an alert when your File Server tunnel disconnects tells you the share is unreachable, which can explain why users could not reach files that were never actually deleted.

Encrypted folders: strong protection, no way back without the password

The Default web file manager supports per-folder encryption with AES-256-CBC. The key is derived from a folder password using PBKDF2 with 100,000 iterations. Neither the key nor the password is stored; only a salt and a verification hash are kept in a hidden .fsvault file. Unlocking a folder gives you an unlock token that lasts 30 minutes. Encrypted folders are another feature that users with a Restricted Path cannot use.

This design matters for recovery in two ways. First, there is no admin override and no password recovery. If the folder password is lost, the encrypted files cannot be decrypted by us or by anyone else, and restoring them from the recycle bin, version history or a backup gives you files that are still encrypted. Store folder passwords in a password manager, and make sure more than one trusted person can reach them if the data is shared.

Second, raw disk recovery does not help with encrypted content. Even if carving tools recover blocks from free space, those blocks are ciphertext. If the encryption metadata, including the .fsvault file, is also lost or damaged, decrypting fragments becomes impractical. For encrypted folders, your recovery layers are effectively the recycle bin, version history and backups, plus the password. Plan backups accordingly.

Lost password means lost data

Per-folder encryption has no recovery path. Before encrypting a folder that others depend on, decide who holds the password and where it is stored. Test that you can unlock a restored copy from your backup destination, so you know the backup is usable and not just present.

A related point applies to disk spanning. File Server can span a share across multiple drives, which is transparent when reading and is designed to fail in a safer way than RAID-0. Spanning is a capacity feature, not a redundancy feature, so it does not replace backups. If you span a share across drives, raw recovery after a deletion would also involve more than one disk, which is another reason to keep the backup layer healthy.

Troubleshooting common recovery problems

The recovery tool does not list the network drive at all

This is normal. Recovery tools need a block device, and a mapped drive is a file-level connection. Run recovery on the server, against an image of its disk, after working through the trash, versions and backups.

I cannot see the recycle bin, versions or backups in File Server

Check whether your account has a Restricted Path. On Default tunnels, restricted users cannot use the recycle bin, file versions, encrypted and private folders, backups or administration features, so those parts of the file manager are simply not available to them. Ask an Admin, or another user without a Restricted Path, to perform the restore. Also confirm you are on a Default tunnel: these are features of the Default file manager, not of an SFTP or WebDAV client.

The file is not in the recycle bin

Check four things: whether the bin was enabled before the deletion, whether the deletion went through an access path the bin watches (scripts, SFTP automation and direct filesystem deletions are common gaps), whether retention already purged it, and whether someone emptied the bin. With our File Server, also consider which type was used, given that recycle bin coverage of SFTP and WebDAV is not documented, and make sure you are looking as an unrestricted user.

The backup does not contain the file

Compare three timestamps: when the file was created, when it was deleted, and when each snapshot was taken. If the file existed for less time than the backup interval, it may never have been captured. With File Server's engine the window is small because of the 30-minute full scan and the 45-second change debounce, but a file that is created and deleted within minutes, or a backup destination that was unreachable at the time, can still leave a gap. Look at the backup engine's status for errors around the deletion time.

The file came back but the content is old

A restored snapshot gives you the file as it was at snapshot time. Check version history for newer content, and compare versions with the diff view before overwriting anything. If several people edited the file, ask them for local copies or exports made after the snapshot.

Restoring brought back files that should stay deleted

This happens when an entire folder or volume is rolled back instead of restoring single files. Always restore into a staging folder when you are unsure, then move only the files you need into place.

Files "disappeared" but no delete event exists

If your webhook log shows no delete event for the path, look for rename or move events, which are also reported. On Default tunnels, users with the Create role can rename items, so a rename is a plausible explanation. Check whether the tunnel was disconnected at the time, using platform-wide tunnel webhooks or the dashboard, since an unreachable share looks like missing files to users. Check whether the folder path was edited recently, because that restarts the tunnel pointing at a different folder. Finally, check whether files were deleted directly on the host machine outside of File Server, which would not pass through the file manager at all.

A user can no longer sign in after the incident

If you removed a user during lockdown, their access ended when you saved. If someone forgot a Default tunnel password, it cannot be changed in place; remove the user and add them again, and they will be asked to choose a new password at first sign-in. If a Restricted Path was edited and now contains .., a drive letter or :, the user has no access at all until the value is corrected.

A restored encrypted folder will not open

Confirm you are using the folder password for that specific folder, that you are signed in as a user without a Restricted Path, and that the hidden .fsvault file was restored along with the files. Without the correct password there is no way to decrypt the contents.

Raw recovery found files without names

File-carving tools such as PhotoRec recover content by signature and give files generated names instead of the originals. Sort recovered files by type and size, and use the timestamps from your audit log to narrow down which ones you need.

A pre-incident checklist for shared folders

Everything in the recovery order depends on decisions made before the deletion. Use this list when you set up a shared folder, whether it runs on a NAS, a Samba server or our File Server.

  • Enable a server-side recycle bin (for Samba, vfs_recycle; for File Server, the Default file manager's bin) and write down which access paths it covers and how old items are purged.
  • Enable version history where documents are edited collaboratively.
  • Configure backups to separate storage, with snapshot retention long enough to notice a deletion. With File Server, set up the backup engine to S3, S3-compatible storage, FTP or SFTP.
  • Run a test restore from an Admin account and record how long it took.
  • Create a dedicated Admin account for recovery work, and confirm it has no Restricted Path.
  • Give every person and script their own user, and grant the Delete role only where it is needed.
  • Use Restricted Path to scope collaborators, knowing that an unrestricted user must handle their restores.
  • On Default tunnels, consider Basic Authentication as an extra lock in front of the sign-in page.
  • Send delete, rename and move events to an external, signed audit log.
  • Store encryption passwords somewhere that survives the loss of any one person or device.
  • Document how to take the share offline and which filesystem, disk type and disk layout sit underneath it, so raw recovery can start quickly if needed.

Frequently asked questions

Why can't I recover deleted files from a mapped network drive with undelete software?

Undelete software reads raw disk blocks, but a mapped drive only gives your computer file-level access to a server. The deletion happened on the server's filesystem, so the leftover data is on the server's disk. Check the server's trash, version history and backups first, and run any raw recovery on the server itself, against an image of its disk.

Do files deleted from a network share go to my Recycle Bin?

Normally not. Files deleted from a network share on Windows are not moved to the local Recycle Bin, and macOS typically warns that items on network volumes are deleted immediately. Only a recycle bin on the server side, such as Samba's vfs_recycle module or a file server application's own bin, can catch them.

What order should I try recovery methods in?

Stop heavy writes, then check the server-side trash, then version history, then backups and snapshots. Only after those fail should you take the volume read-only, image the disk and scan the image. Failing hardware should go straight to careful imaging or professional recovery.

Does the Localtonet File Server have a recycle bin and version history?

Yes, the Default web file manager includes a recycle bin and version history with diff. Our documentation does not state whether these also cover deletions made through the SFTP or WebDAV types, so test this on your setup before relying on it.

Why can't some users see the recycle bin or backups in File Server?

On Default tunnels, a user with a Restricted Path works only inside that folder and cannot use the recycle bin, file versions, encrypted and private folders, backups or administration features. Restores from those layers must be done by a user without a Restricted Path, typically an Admin.

How often does the File Server backup engine run?

It runs a full scan every 30 minutes and also reacts to file changes after a 45-second debounce. Failed attempts are retried with exponential backoff, and snapshots are retained so you can restore an earlier state. Supported destinations are S3, S3-compatible storage, FTP and SFTP.

How do I stop users from deleting files on a shared folder?

In File Server, open Manage in the Permissions column and leave the Delete role unticked for every user who does not need it, then select Save Changes; role changes take effect when you save. Give people Read, or Read and Create, instead. Use a Restricted Path to confine a user to one folder, and share links with expiry dates, download limits and passwords for people who only need to receive files. On Default tunnels you can also turn on Basic Authentication in the tunnel settings as an extra lock.

Can I reset a File Server user's password?

On Default tunnels, existing passwords cannot be changed. Remove the user, add them again with a new entry and save. In the Default file manager, a new user is asked to choose a new password the first time they sign in.

Can I recover an encrypted File Server folder if I forget the password?

No. Per-folder encryption uses AES-256-CBC with a key derived from the password, and neither the key nor the password is stored. There is no admin override or password recovery, and backups of encrypted folders stay encrypted.

Is a Localtonet File Server tunnel a VPN?

No. A File Server tunnel publishes one local folder through our relay while the client and tunnel are running. Our private mesh VPN is a separate feature called VPN Manager.

Give your shared folders an undo button

Share a folder with our File Server, keep an Admin account for restores, give everyone else only the roles they need, and set up the recycle bin, version history, scheduled backups with retained snapshots and signed delete webhooks before the next accident happens.

Get Started Free →

Corrections & updates

Substantive changes approved by the Localtonet editorial team are listed transparently below.

Updated the File Server setup steps and user permission roles to match current documentation, and clarified which users can access the recycle bin, versions and backups.

Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.

Support