Sharing a Folder
Share a folder when people on other computers need to open and save its
files. When you finish, the folder is reachable from Windows, Mac and Linux
computers by an address such as \\peios-box\Projects.
Before you start #
- Sign in as a member of Administrators. Only Administrators can change shares.
- Make sure the folder exists, and that its permissions let the people who will use it open its files. Sharing a folder doesn't change its permissions: File Sharing explains why.
- Each person who connects needs an account on this machine.
Share a folder with the File Sharing window #
- Open File Sharing from the launcher. From a terminal,
fserv --windowopens the same window. - Choose Share a folder in the sidebar.
- In Folder, type the folder's full path, such as
/srv/projects, or choose Browse… to pick it. - In Name, keep the suggested name or type another. The name is part of the address people type, so a short name without spaces is easiest.
- Leave Network access set to No network restriction, unless the share should be more restricted than the folder's own permissions.
- Choose Share Folder.
The new share's page shows its addresses under Connect, and the file server's state is on the Service page. If the file server is stopped, choose Start, and turn on Start when Peios starts so the share is available after every restart.
Share a folder with the fserv command #
-
Add the share:
-
If the file server isn't running, start it, and make it start at boot:
fserv share add refuses a folder that doesn't exist, a name another share
already has, or a name with characters that SMB doesn't allow, such as /
or :. Read fserv(8) for every option.
Check the result #
Run fserv share show with the share's name:
The output includes SMB on, the access, and the addresses to connect to:
Share Projects
Folder /srv/projects
SMB on
Access No network restriction
Windows path \\peios-box\Projects
Mac/Linux smb://peios-box/Projects
fserv status shows whether the file server is running. Then connect from
another computer, as described in
Connecting to a Share.
Stop sharing a folder #
On the share's page in File Sharing, choose Stop Sharing…, or run:
The folder and its files stay where they are. People already connected keep the share until they disconnect.