Setup the File Sharing Service in macOS 10.13, High Sierra

macOS Server 5.2/5.3 and below had this great file sharing service. And while the GUI elements are gone from the Server app in High Sierra, the options available in the client operating system have matured to the point where they’re no longer really necessary. You can still configure users and groups using the Server app, and once those are created, you’ll be ready to configure share points that can be accessed using the Sharing System Preferences.

Configure Sharing Through System Preferences
To access the sharing options, open System Preferences and click on File Sharing. First, we’ll configure the global options using the Options… button.

This brings up the ability to choose whether to share with AFP or SMB. Notice that FTP is gone and will need to be started from the command line. Check the box for each user that will be sharing files via Windows (unnecessary with OD-based users), and each protocol you’d like to share data as.

Next, we’ll configure share points. From the File Sharing entry in System Preferences, you’ll see a list of Shared Folders and Users. I like to remove everything the system adds by default. Then, use the + sign to add a add a new shared folder. 

Browse to the folder you’d like to share and then click on the Add button.

Once shared, configure the permissions of the folder. If you have the Server app, the best way to do this is to open the Server app, click on the name of the server, and then click on the Storage tab. From here, you can browse to a given share to configure ACLs.

From the cog wheel icon at the bottom of the screen, choose the Edit Permissions… button.

At the Edit Permissions screen, you can add additional users, and configure permissions more granularly than otherwise.

Once you make changes, you can use the same cog wheel icon to “Propagate Permissions.” Doing so will apply the same set of permissions on all child files. If you don’t have the server app, many of these same options will be available by doing a Get Info on a folder (which you can do with the Command-I keystroke, or with the File->Get Info menu item, within a standard Finder window.

Overall, there are fewer GUI options. And wwwwwaaaaaaayyyyyy fewer options, now that the serveradmin command line options are no longer available. But if there’s something you could do before that you can’t any more, let me know and I’ll add it (or a script to accomplish it) to this article.

Client Configuration
Once configured, you’ll want to connect to your server from a client. To connect to a share, use the Connect to Server dialog, available by clicking Connect to Server in the Go menu. A change that happened way, way back in Mavericks is that when you enter an address, the client connects over SMB by default (which is even better now that those connections can be encrypted). If you’d like to connect via AFP ‘cause you’re all old school, enter afp:// in front of the address and then click Connect.

Command Line Management
The File Sharing service can also be controlled from the command line. macOS also has the sharing command. Using this command you can programmatically inspect, create, delete and augment information for share points using sharing. 

To create a share point for AFP you can use the following command:

sharing -a <path> -A <share name>

So let’s say you have a directory at /Shares/Public and you want to create a share point called PUBLIC. You can use the following command:

sharing -a /Shares/Public -A PUBLIC

Now, the -a here will create the share for AFP but what if you want to create a share for other protocols? Well, -F does FTP (even though FTP is older than I am) and -S does SMB. Once created you can disable the share using the following command:

sharing -r PUBLIC

To then get a listing of shares you can use the following command:

sharing -l

Mac OS X Server 10.5: Sharing Files the New Way

I originally posted this at We’ve gotten a few questions from people asking how you’re supposed to setup share points for Leopard Server. It’s relatively simple but will require a little getting used to for those who are used to configuring sharing options in Workgroup Manager. To view the shared folders on a system, open Server Admin and click on the name of the server in the SERVERS list. From here, click on the File Sharing button in the Server Admin toolbar and you will see a list of the logical volumes that your server can see along with a handy Disk Space image showing how full the various volumes are. At this point you can click on Share Points to see which folders are currently being shared over SMB, AFP, NFS or FTP. If you click on Volumes and then the Browse button then you will be able to configure new folders to become share points that you want others to get access to. Browse to the folder to be shared and then click on the share button in the upper Right hand corner below the tool bar. Now you are looking at 3 tabs along the bottom of the screen: Share Point, Permissions and Quotas. From here, click on Share Point and review the options: Enable AutoMount – provides options to setup an OD link to the volume Enable Spotlight Searching – allow the volume to be searchable using Spotlight Enable as TimeMachine Backup Destination – client computers can backup using Time Machine Protocol Options – brings up the screen that allows SMB, AFP, NFS and FTP settings to be configured (looks very similar to the old screen in Workgroup Manager) Once you have configured the options for your share point click over to the Permissions tab. Now you can configure who has access to shared data. From here, the main change is that the Users and Groups window is a floating window, with a new look and feel, but with the same overall feature set. The next major change is that ACLs are listed above POSIX permissions, and when you drag a user or group into the window you will see a blue line indicating that you can drop the object off into the screen and it will stay. Finally, click on the Quotas tab and notice that when you enable quotas you cannot drag users and groups into this window. Only users with a home folder on the volume can be configured for quotas using Server Admin. If you would like to configure quotas otherwise you can do so at the command line.