Access Linux Machines using Apple Filing Protocol
Simplified sharing of files between computers is a very compelling reason for installing a home computer network. There are many protocols that simplify file-sharing: FTP, Secure FTP, Samba/Windows File Sharing, NFS, and Apple Filing Protocol (AFP). The last three support mounting remote file-systems on the local machine, making the remote system semi-transparent.
I'm hoping to upgrade my Mac machines to Mac OS X Leopard soon, and would like to take advantage of the new Time Machine feature. Time Machine will periodically backup changes to your system to an external hard-drive or network file-system. This makes file backup and recovery automatic. I have a Linux box that I think would be well-suited for hosting a backup-drive, so I began researching what it might take. I've read that Time Machine will back-up to network file-systems only over AFP. My Fedora Core 6 Linux machine was not configured to use AFP by default. What follow are the steps I took to get AFP support working under Fedora Core 6 with Netatalk 2.x.
The tutorial I found most helpful was on the Gentoo Linux site. I took the steps of installing the 'netatalk' and 'atalk' RPMS using YUM (yum install atalk netatalk).
Next, I changed directories to '/etc/atalk' in order to edit the configuration files provided by atalk. As mentioning in the tutorial, I configured the following services to run:
# Set which daemons to run (papd is dependent upon atalkd): ATALKD_RUN=no PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no
Next, I edited the 'afpd.conf' file to contain the changes mentioned in the tutorial. I added the following line at the bottom of the file:
- -noddp -advertise_ssh
I then edited the 'AppleVolumes.default' file to ensure that only home-directories (~) are accessible by AFP. This, too, is described in the tutorial.
Lastly, I configured the AVAHI daemon to publish the service using mDNS (Rendezvous
) by creating the file '/etc/avahi/services/afpd.service' with the XML document provided in the tutorial.
Make sure that the following services are enabled in the Fedora Services tool (run 'setup', select 'System Services'): atalk, avahi-daemon. Also, make sure that AFP (port 548, protocol TCP) is allowed through the firewall, if you are running one. Consider rebooting the machine, and you should be done.
I'm now able to access my Linux machine using AFP, which yields higher transfer rates and is better supported by OS X than the Microsoft-designed SMB protocol. Maybe I'll be able to use Time Machine, too!
