I found a few guides for installing netatalk on Ubuntu server, and while this was the best I wound up combining information from a number of places and a little trial and error in a virtual machine before settling on the steps.
- First we need to install netatalk and avahi-daemon. The first provides the actual afp daemon and the second the bonjour daemon to allow the MacBook to see the afp shares.
$ sudo apt-get install netatalk avahi-daemon - Once installed, configure the netatalk daemon by editing /etc/default/netatalk
$ sudo nano /etc/default/netatalk
Ensure that the following options are set:
ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no - Next modify the netatalk shares by editing /etc/netatalk/AppleVolumes.default
$ sudo nano /etc/netatalk/AppleVolumes.default
Add "tm" to the default options line:
DEFAULT: options:tm,upriv,usedots
And add a line similar to the following to create the Time Machine share. User home directories are shared by default as well but I find having a single share for time machine bundles it more manageble:
/data/backup/TimeMachine "Time Machine" cnidscheme:dbd allow:@timemachine - Before we forget we should create the timemachine group and folder.
$ sudo addgroup timemachine
$ sudo addusertimemachine
$ sudo mkdir /data/local/backups/timemachine
$ sudo chgrp timemachine /data/local/backups/timemachine
$ sudo chmod 775 /data/local/backups/timemachine - Lastly we need to configure avahi. This is done by creating /etc/avahi/services/afpd.service and adding the following XML code:
$ sudo nano /etc/avahi/services/afpd.service
%h
_afpovertcp._tcp
548
_device-info._tcp
0
model=Xserve
- Restart netatalk and avahi and test in Finder
$ sudo /etc/init.d/netatalk restart
$ sudo service avahi-daemon reload
EDIT: I did find it helped to set the group ownership on the shared folder to something like "users" or "staff" and set the permissions to 2775 to allow the group ownership to automatically propagate to new files added.
No comments:
Post a Comment