MacOS – Stop sharing primary [boot] and Time Machine drive via AFP

afpmacos

I have three folders setup as shared folders in the Sharing [System] Preferences on my AFP [not SMB] file server. My file server is running OS X [not OS X Server] 10.11 El Capitan.

When I connect to the file server via AFP and authenticate as an admin user, I am able to mount these three folders, as well as my home directory and the file server's primary [boot] and Time Machine drives.

I would prefer that the file server not share the primary [boot] and Time machine drives with AFP clients, even if the user is an admin.

I have a different file server that runs OS X Server 10.8 Mountain Lion. Here the primary [boot] and Time Machine drives are not shared by default. This is what I want but I don't want to install OS X Server to get this.

I am thinking that there must be a way to do this as both OS X and OS X Server are using /usr/sbin/AppleFileService to provide AFP service and so the difference must be happening somewhere else (or the default behavior has changed between OS X 10.8 to 10.11).

Does anyone know how to do this?

Best Answer

Issuing the following command and restarting /usr/sbin/AppleFileServer would seem to have been the solution.

$ sudo /usr/bin/defaults write /Library/Preferences/com.apple.AppleFileServer admin31GetsSp -boolean true

It wasn't. Connecting to the file server as an admin user continued to result in my seeing both share points and volumes. I wanted to see share points but not volumes.

Issuing the following command and restarting AppleFileServer was the solution.

$ sudo /usr/bin/defaults write /Library/Preferences/com.apple.AppleFileServer fullServerMode -boolean true