As with the last post, this is another quick write-up of how to get Ubuntu 12.04 on my home server to play nicely.
Specifically, this one deals with running a file server accessible from my desktop, which is a Mac running OSX Lion.
Yes, we could use Samba, but I don’t have any Windows machines, and I like keeping things simple. Using netatalk and avahi removes all that Windows-related unpleasantness, and also seems more efficient – files certainly seem to transfer much faster than they did using Samba.
That was easy.
There are, of course, a few tweaks:
Add this line to the bottom of that file:
Next, define the actual shares:
Scroll to the bottom of the file, comment out the default home directory share, and replace it with this one, plus extra lines for any other directories you want to share:
1 2 3 4 5 6 7 8 9 10
Finally, restart the services:
As Paul pointed out in a comment, if you’re running a firewall you’ll need to allow connections on TCP port 548. Assuming you’re using ufw (and if you’re not, you should be – it’s great), it’s a simple matter of:
Or if you want to be more selective about who gets access, you can restrict it by IP:
In the above example, my Ubuntu server is at 192.168.1.4, and my Mac is at 192.168.1.8. Or if you use DHCP, allow the whole range or indeed the whole class C:
Now if you open a Finder window on your Mac, you should see the server show up under the Shared section – click on it, log in using your Ubuntu username/password, and viola – there are your shares.