Personal File Sharing uses AFP. The process that provides AFP service is AppleFileServer. The executable file resides in /System/Library/CoreServices/AppleFileServer.app/Contents/MacOS/, but you normally invoke it from a symbolic link, /usr/sbin/AppleFileServer. You start and stop AFP service from the Sharing pane of System Preferences. You can also start or stop service from the command line by starting the process directory. There are system plist files in /System/Library/CoreServices/AppleFileServer.app/Contents that also control AFP, but you shouldn't touch those. Two configuration files control AppleFileServer: /etc/hostconfig and /Library/Preferences/com.apple.AppleFileServer.plist. In addition, a property in com.apple.sharing.firewall.plist controls whether the AFP port in the firewall is open. You can use Property List Editor to edit the two plist files. You can also edit these files with a text editor, but first you must convert them from binary to text XML format: sudo plutil convert xml1 /Library/Preferences/com.apple.AppleFileServer.plist The system log, /var/log/system.log, contains entries for AFP startup and for abnormal shutdown. An error log and an access log also reside in /Library/Logs/AppleFileService. Starting the Apple File ServiceStarting Apple File Service consists of a series of steps:
When you stop Personal File Sharing in the Sharing pane of System Preferences, the steps are reversed. That is, the configuration files are changed back and the AppleFileServer process quits. As an alternative to using Sharing preferences, you can enable AFP service by performing these tasks, as root:
To stop AFP service, you would reverse these steps, changing the file settings and killing the process. Editing com.apple.AppleFileServer.plistNo graphical user interface exists that is specifically designed for modifying the behavior of AppleFileServer, but you can use Property List Editor or a text editor to edit the file com. apple.AppleFileServer.plist in /Library/Preferences. Alternatively, you can use the defaults command. For example, to change the Boolean property admin31GetsSp from true to false, you would type the following: sudo defaults write /Library/Preferences/com.apple.AppleFileServer admin31GetsSp -bool false Note Stop AppleFileServer before you make changes to its properties. The following figure illustrates how changing items within the com.apple. AppleFileServer.plist affects users gaining access remotely. Two properties that you might need to edit are:
|