3. Shared folders
A shared folder is a folder on a volume that you give people access to: Photos, Documents, Media, Backups. You manage them in Settings > Shared Folders.
The same permissions hold everywhere: in Files, over SMB and NFS, over SFTP, and for the apps that use the folder. OSM writes them as standard Linux access lists (POSIX ACLs), also for the files and folders created later.
Creating a shared folder
In Settings > Shared Folders, Create opens a dialog with three tabs: General, Permissions and Quota. On General:
- Name and Description (optional). The name is also the folder's name on the network.
- Location: the volume it lives on. Choose a Btrfs or ZFS volume if you want snapshots and earlier versions.
- Share it over SMB (Windows, macOS, Linux), and Hide it in the network's list of shares (it stays reachable by its name). SMB is installed in Settings > File Protocols.
- A Time Machine destination for Macs, with a size its backups may not exceed if you want (Files).
- Recycle bin: what is deleted goes to its Recycle Bin folder first, and is emptied after a number of days or by hand. A Time Machine destination has none (what macOS deletes there would pile up in it, outside the size limit): the choice is greyed out while Time Machine is ticked, and comes back when it is not.
- Encrypt it (gocryptfs): only when the folder is created (below).
When the volume already has a folder of that name (one a deleted shared folder left, or one made by hand), it becomes the shared folder with everything in it, and its contents get the new permissions in the background. Through OSM Connect that asks for your second factor again (Confirm it is you), since it opens those files to the people you choose; a new, empty folder does not.
Edit changes these later, the name too. A renamed folder keeps its snapshots, its shared links, Media Streaming, the search and the media index, its virus scans, the remote folders mounted in it, the USB drives' copies into it and everyone's favourites in it. A folder that apps use cannot be renamed, nor one that a backup, cloud or replication task names, nor one that a drive of the Domain app maps on the Windows PCs: OSM lists them, to change or remove first. An encrypted folder keeps its name: to have it under another name, create a new encrypted folder and move the files into it.
A Save that OSM refuses changes nothing: the folder keeps its name, its permissions and its size limit. While another shared folder task runs in the background (permissions being set on everything in a folder, say), a Save that needs one, or deleting a folder with its files, waits: OSM says which task to wait for.
Permissions
For each shared folder, give every account and every group one of:
- Read/Write: read, add, change and delete;
- Read only: read and download;
- No access: not even its name in a list;
- — (not set): its groups decide.
Over SFTP and FTP, a standard account does not see the list of shared folders on a volume: it opens its own by their path (for example /volume1/Photos). Administrators still see them all.
Rules:
- An account's own setting wins over its groups'. A group setting is the simple way to manage many people: give the group access, and add people to the group.
- Apps is a line of its own: the container apps that use the folder (Jellyfin reading Media, for example). It can be set before any app is installed.
- Read only is about other people's files: someone set to Read only can still change and delete the files they made themselves in the folder, as on Windows and most file servers. No access stops everything, their own files too.
- An account or group deleted elsewhere (in the Domain app, or in the directory) shows as (no longer exists): keep it, or choose — to take it out. It never stops a Save of the folder's other settings. Accounts and groups whose name is only digits get exactly their own access.
- A new shared folder gives the Administrators group Read/Write, and nobody else any access until you add them. Everyone is the built-in group of every account that may sign in.
- When you change the permissions of an existing folder, Also set them on everything in the folder applies them to what it already holds, in the background. A Save that leaves them as they were changes nothing inside the folder: what someone made private there stays private.
- Set them again on everything in the folder, also when they did not change (a repair) puts the folder's permissions back on everything it holds, in the background: for permissions changed by hand inside it, over SMB or in the Terminal.
- Through OSM Connect, changing who may open the folder, read it or write it (and the repair above) asks for your second factor again (Confirm it is you), as changing an account does. A Save that changes only its description or its other settings does not.
- What is copied into a shared folder gets its permissions, as a new file there does: never the ones it had where it came from. So does what you move into it in Files from another shared folder or your home folder, when it is yours; what is someone else's keeps its permissions (its owner or an Administrator can set them again). What you extract from a zip or tar archive gets them too, never the archive's own; files saved over SMB can be changed by the folder's other Read/Write people.
When the server is joined to a directory (Accounts), its accounts and groups can be given access too, but only with the API or the command line (osm-cli.py call shares.update, see API and command line): Settings > Shared Folders lists this server's own accounts and groups. Name a directory group as this server knows it: an Active Directory group in small letters, with its spaces (domain users), an LDAP group as the LDAP server has it (Sales Team).
Who can see what
Who can see what... in Settings > Shared Folders shows every shared folder against every account, and what to look at. The answer is the one Linux gives: each folder's own permissions with each account's groups, so a change made another way (in Files, or on the command line) counts too. Nothing here changes anything.
Every account means this server's accounts, the accounts of a joined directory that a folder's permissions name, and the members of the directory's groups that may open a folder. When the directory does not list a group's members, the report says so. The apps' account (Apps) and the system's accounts are listed after the people, and are never counted as not used.
What to look at lists, each with a button to the place where it is changed:
- a folder where Everyone may change files (a note when Everyone may only read it);
- a folder whose permission for others lets in any account of the server, and every app;
- a group of the directory that may open a folder, whose members the directory does not list;
- an account not used for a number of days (Not used for: 90 at first) that may still open folders. OSM counts sign-ins to the desktop, SMB, SSH and FTP, and the use of API tokens, from the day the server had this version, or from the day the account was made when that is later. An app's own sign-in is not counted (opening an app from the desktop is): the report names the apps whose people sign in with accounts of the app's own;
- an account that is turned off, and that a folder's permissions still name;
- share links and file requests that reach a folder and still open, and how many of them have no end date;
- a folder exported over NFS (computers by their address, with no account). While NFS is off, the rules kept for a folder are a note, not a warning;
- a folder in Media Streaming, whose pictures, music and videos every device on the network can see without an account (a note while Media Streaming is off);
- the apps that use a folder;
- folders inside a shared folder with permissions of their own;
- folders inside a shared folder where another computer's folder is mounted: they are not looked at;
- a folder that is locked, or whose volume is not mounted: it is shown as its saved permissions will give it once it is there again.
Who may open each shared folder shows each account's Read/Write, Read only or nothing. Point at an entry to see why: the account's own permission, or the groups it has it through. A locked folder's column is marked Locked, and an account of the directory Directory.
Download CSV saves the table to open in a spreadsheet; Page to print saves a page to print, or to keep as a PDF from the browser.
Quotas
Quota sets the largest size of a shared folder (the Quota tab, Limit its size, for the volume chosen in Location). Quotas work on ext4 volumes with quotas on (every new ext4 volume), on Btrfs and on ZFS. An older ext4 volume made without them has Turn on quotas... on its card in Storage > Storage.
- On ext4 and ZFS, computers connected over SMB see the limit as the folder's size.
- On Btrfs, computers and Files see the whole volume's free room, not the limit: a copy that goes over the limit stops with an error halfway. OSM turns on the volume's quotas when its first folder gets a limit; a Save that leaves the limit as it was changes nothing. Quotas that an earlier OSM turned on for a volume where no folder has a limit are turned off after this update, in the background (they slow the volume down for nothing).
Each account can also have a quota on each ext4 volume with quotas on: Edit the account in Settings > Users and Groups, then its Quota tab.
The recycle bin
With the recycle bin on, what is deleted in Files or over SMB goes to the shared folder's Recycle Bin folder first, in the same place it was below the folder. So does what a cloud task's Mirror down takes away there, with the run's mark in its name (Cloud drives).
- Restore in Files puts a file back where it was, under its own name: a second "Project" deleted is "Project (2)" in the bin, and comes back as "Project" when that name is free again. A restore never gives anyone more than the item gave before it was deleted: what is yours gets no more than the folder it goes back into gives today (someone taken out of the folder since keeps nothing on it; a folder's contents in the background), and what is someone else's keeps the permissions it has (its owner, or an Administrator with Set them again on everything in the folder, can give it the folder's). A folder that is gone since is made again as private as it was.
- What is deleted from a folder lies in the bin in a folder of the same name with that folder's permissions: what was deleted from a subfolder made private stays private in the bin. Deleted over SMB from inside a folder, it lies in a folder of the bin that only the person who deleted it opens.
- Empty recycle bin in Settings > Shared Folders deletes its contents for good. The bin also empties itself of what is older than the number of days you chose (0: only by hand), each thing by when it was deleted: a file deleted into a folder already in the bin waits for its own time. Saving new permissions does not start the countdown again: what is in the bin keeps the permissions it had when it was deleted, so someone given access later does not get the older items, restored or not, until an Administrator sets the folder's permissions again on everything in it.
- "Older" is told by the server's clock. While OSM doubts the clock (it jumped by more than a day, or was set back: the bell says so, see System), the bins do not empty themselves; Empty recycle bin still works. What went into a bin while the clock was ahead waits until that date has come.
- What is in a remote folder mounted inside the shared folder has no recycle bin: its files are on the other computer, and Delete there deletes them for good (Files says so).
- Recycle bins are left out of backups, cloud tasks, search, virus scans and Media Streaming (TVs and players do not see what was deleted).
- Over SMB, the scratch files Office and LibreOffice make while they save (
*.tmp,*.temp,~$*,.~lock.*#) are not kept in the bin. Everything else is, in folders called Temp or tmp too. - Over SMB, a delete skips the bin when the bin holds a file named like the deleted file's folder (a file
Planin the bin, andPlan/notes.txtdeleted): Samba deletes it for good. Files moves such a file aside (Plan (2)) and keeps the deleted one. - A file called Recycle Bin at the top of a shared folder stops its bin: Files says so, and a file request refuses that name.
- Through OSM Connect, deleting for good (in a bin, or with Delete for good), turning the bin off and making it keep things for fewer days ask for your second factor again, as emptying the bin does.
Encrypted shared folders
A shared folder can be encrypted when it is created (with gocryptfs, and a password of 8 characters or more). Its files are stored encrypted on the disks, and readable only while it is unlocked with its password.
- Lock / Unlock in Settings > Shared Folders locks or unlocks it. While locked, it is gone from Files and SMB, and nobody can read it, not even an Administrator.
- Unlock at start-up... has OSM keep its password so it unlocks when the server starts (a locked folder stays locked until then: the password is only checked). With a TPM 2.0 chip, the password is sealed in it: the disks, even all of them, give nothing away on another computer. Without a TPM, the password is kept on the system disks, which protects data disks that are taken away alone. When it does not unlock at a start, a notification says so; it goes once the folder is unlocked, when OSM no longer keeps its password, or when the folder is deleted. A folder whose volume was not there at the start (its disks came late, or one was missing) is said so too, and unlocks by itself when the volume is there.
- Unlocking it (Lock / Unlock) asks for its password, with Also unlock it at start-up (OSM keeps the password): ticked, OSM keeps it; unticked, OSM forgets a password it kept, and the folder stays locked after a restart until someone types it.
- An encrypted folder has no quota and no snapshots, is not shared over NFS, and is never indexed for search.
- An encrypted folder cannot be given to an app: the app would keep reading it after Lock, and would write unencrypted files into it while it is locked. An app given one before November 2026 is named in a notice; until you give it another folder (its settings in the App Catalog), the folder cannot be locked.
- While it is locked, its permissions cannot be changed (they would never reach its files): unlock it first.
- While it is locked, backups leave it out (and keep its older versions: they delete none while a folder is missing), and cloud tasks and replication of it wait; a restore into it is refused. Unlock it first.
- Keep the password somewhere safe. Without it, nobody can read the folder.
Snapshots and earlier versions
On Btrfs and ZFS volumes, snapshots keep the earlier versions of every file in a shared folder: set them up in Storage > Snapshots (Storage). People see them in Files (Earlier versions) and in Windows (Previous Versions): only those who may open the shared folder now, each snapshot as its permissions were when it was taken.
OSM deletes the snapshots a folder's keep rules no longer keep, and it is careful about it:
- When a folder's rules were not applied for more than a week (the server was off, the folder's schedule was off, or the server's date changed) and would then delete many of its snapshots at once (more than a quarter of them, and more than three), OSM waits three days first, and a notification names the folders, how many snapshots, and the server's date. In those three days, Lock the snapshots you want to keep (Storage > Snapshots > List); if the date is wrong, set it in Settings > Language and Time. After the three days the snapshots are deleted. A server that is off at night or over a weekend is not asked this way: what grew old meanwhile is deleted as the rules say.
- Keep rules you change in Schedule... while the schedule is on apply as soon as you save them, without that wait: what the new rules no longer keep is deleted then. Turning a schedule on deletes nothing at once: its first round applies the rules, with the wait above when that would delete many snapshots made before.
- While OSM is not sure of the server's date and time, it deletes no snapshot by its rules, and no immutable one at all (System says when that is).
- A snapshot dated in the future (taken while the server's date was ahead) is kept: delete it by hand if you do not want it.
Moving in from another server
Copy from another server... in Settings > Shared Folders copies the shared folders of your old server (another NAS, a Windows or Linux computer) into shared folders here. OSM only reads the old server: nothing there changes.
- The old server: how it shares its folders (Windows file sharing (SMB), which Windows, macOS and most NAS use, or NFS), its name or address, and for SMB an account that may read every folder you want to copy (and, under More, its domain or SMB version). The first time, OSM offers to install what it needs (cifs-utils, smbclient and nfs-common).
- What to copy, and where: the folders the old server shares. Tick those to copy, and choose for each a new shared folder (named like the old one; you can change the name) or one you have. An NFS server that lists none: add each export by its path.
- Who may use them: for each new shared folder, the permission of every account and group. People need accounts of their own first: passwords cannot be copied from any server, so each person gets a new one. Import accounts from a list... makes many at once from a CSV file (Accounts).
- Copy: Start copying. It runs in the background, also while you are away and while OSM updates itself, and Copies from other servers, below the list, shows how far it is.
What a copy does:
- Files keep their dates. A shared folder's permissions apply to what it receives.
- Nothing is ever deleted here, and a file that is newer here is never replaced: what people changed on the new server stays.
- The old server's recycle bins, snapshots and thumbnails are left out (you can untick that). So are links and special files.
- Pause stops it, Resume goes on where it was. A copy that the server's restart stopped says so and goes on with Resume.
- Copy what changed copies, later, only what is new or changed on the old server since: run it as often as you like, until the day you switch.
- Report... lists the files a copy could not copy, and why (the account may not read them, a link, no room left). OSM tells you when a copy is finished.
- The old server's password is kept only until the first copy is finished, unless you tick Keep the old server's password; it is never shown again. Forget removes a copy from the list (what it copied stays).
- Over NFS, this server reads what the old server lets its root account read: share the folders with this server without "root squash", or make them readable by everyone.
Deleting a shared folder
Delete stops sharing the folder. Its files stay on the volume unless you tick the box to delete them too. What Settings > Search Index read of it goes. OSM refuses while apps use the folder.
With its files. Tick Also delete ... with everything in it, and the dialog lists what goes: the size of its files when OSM knows it, its snapshots (locked or not), the backup versions kept in the folder, the cloud tasks and the replication that use it, and the backup tasks that back it up. Then type the folder's name: without it nothing is deleted. Its immutable snapshots stay until their time; on ZFS, its files can be deleted only after that. An encrypted folder is deleted with its files only while its volume is mounted. When its files could not all be deleted (a file in use, say), the folder is no longer shared all the same: the message names the folder left on the volume, and you delete what is left in Files.
Either way, what the folder gave goes with it: its share links stop, Media Streaming and the scheduled virus scans leave it (a schedule that scanned only this folder turns off, and the bell says so), and the files that stay on the volume are for the Administrators only (in Files, under the volume): the people of its permissions no longer read or change them. Its links never open a later shared folder of the same name. (A new shared folder of that name on the same volume shares the files that stayed again, with the new folder's permissions.)
The cloud tasks and the replication that used the folder are turned off, not deleted, and the bell says so: a new folder of the same name is another folder, and they never run on it by themselves (Cloud drives, Other OSM servers). What they copied to a cloud or to another server stays there.