Netatalk is a free, open-source implementation of the Apple Filing Protocol (AFP). It allows Unix-like operating systems to serve as file servers for Macintosh computers.
Install the AUR package.
Besides the configuration files that are installed (and checked during upgrade), netatalk may generate two files
/var/state/netatalk/afp_signature.conf which holds the system UUID, and
/var/state/netatalk/afp_voluuid.conf which holds volume UUIDs for TimeMachine. These files may remain after package removal and should be kept in most cases to disambiguate the services broadcast over the local network.
Netatalk 3.x uses a single configuration file,
/etc/afp.conf. See and the following example (make sure processes have write access to
[Global] mimic model = TimeCapsule6,106 log level = default:warn log file = /var/log/afpd.log hosts allow = 192.168.1.0/16 [Homes] basedir regex = /home [TimeMachine] path = /mnt/timemachine valid users = tmuser time machine = yes [Shared Media] path = /srv/share/media valid users = joe sam
In order to allow guest read-only access to your shared folders, add following line to the
[Global] uam list = uams_guest.so
To allow guest read/write access, first, allow read-only access as in the previous example and then add following lines to a particular share section:
[Your Share] path = /mnt/public/share rwlist = nobody
If you use the iptables package for firewall services, consider adding the following: (replace
-A as necessary)
iptables -I INPUT -p udp --dport mdns -d 220.127.116.11 -j ACCEPT iptables -I OUTPUT -p udp --dport mdns -d 18.104.22.168 -j ACCEPT
iptables -I INPUT -p tcp --dport afpovertcp -j ACCEPT
iptables -I INPUT -p tcp --dport slp -j ACCEPT iptables -I OUTPUT -p tcp --dport slp -j ACCEPT iptables -I INPUT -p udp --dport slp -j ACCEPT iptables -I OUTPUT -p udp --dport slp -j ACCEPT
iptables -I INPUT -p tcp -m multiport --dport at-rtmp,at-nbp,at-echo,at-zis -j ACCEPT iptables -I OUTPUT -p tcp -m multiport --dport at-rtmp,at-nbp,at-echo,at-zis -j ACCEPT
Bonjour/Zeroconf is now a requirement of netatalk and is compiled by default. No configuration is necessary, netatalk will register its own services using the dbus link. Make sure you set
-mimicmodel to the desired string (see
/System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist on a Mac for a full list).