File Sharing Services
Mac OS X’s native file-sharing method is the Apple Filing Protocol ( AFP). As with related technologies like SMB and NFS (see Section 11.4), 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, as described in Section 7.2.1. The program keeps its configuration
information (including the location of log files, whether it allows
Guest access, and so on) under the NetInfo
database’s
/config/AppleFileServer
directory.
Toggling this checkbox in the Sharing pane also modifies the
AFPSERVER
line in
/etc/hostconfig
, read by the startup script
/System/Library/StartupItems/AppleShare/AppleSahre
(see the next section).
The AFP server handles user authentication through NetInfo, just like
Mac OS X generally does when handling user logins. When working with
a mounted volume, that disk’s permission system
applies just as if that same user were logged into the machine and
accessing the filesystem directly. If a user mounts a volume as
Guest
(and the server is set to allow Guest access), then the server grants ...
Get Mac OS X in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.