O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

File Sharing Services

Mac OS X's native file-sharing method is the Apple Filing Protocol (AFP) . As with related technologies such as SMB and NFS, it lets users of other computers (often, but not necessarily, other Macs) mount volumes of your local filesystem onto their own.

Both the command-line and GUI interfaces for administering AFP are very simple. To turn on AFP, activate the Personal File Sharing checkbox in the Sharing preference pane's Services tab. This simply launches the AppleFileServer daemon (which resides in /usr/sbin). AppleFileServer takes no arguments; it makes all your machine's volumes and User folders available for mounting on other computers. The program stores its configuration information (including the location of log files, whether it allows Guest access, and so on) in the /Library/Preferences/com.apple.AppleFileServer.plist file.

Toggling this checkbox in the Sharing pane also modifies the AFPSERVER line in /etc/hostconfig, read by the startup script /System/Library /StartupItems/AppleShare/AppleShare (see the next section).

The AFP server handles user authentication through Directory Services, in most cases referring to NetInfo for the list of volumes it's allowed to provide to the requesting user. This list, of course, varies depending on the type of account that user has on the server.

Users with no accounts can log in as Guest and are allowed only to mount the Public directories (as defined by the sharedDir property of each user's NetInfo record) within ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required