filesharing

Syndicate content

Bonjour!

Setting up filesharing on Linux has never been a completely satisfying experience for me. Samba, NFS, FTP. I tend to settle on FTP, but I don't have a preferred server for which I know the conf file format, and I've been confounded in the past trying to set up this simple case:

All login users get access to their home dirs.

So I've been playing with mDNS/Zeroconf/Rendevous/Bonjour - just call it whatever you want to. The implementation used for Linux is called Avahi. So if you install the avahi-daemon package throughout your home network, you get automatic hostnames under the .local TLD, for free. Yippie! It even works with Macs.

The cool part is the ability to advertise not just machines via peer-to-peer DNS, but also services. OSX users know what I'm talking about, yeah. You think you're bad, punk? We got it on Linux too!

Ahem. Getting back to filesharing, this post shows how to easily set up vsftpd for the sharing scheme I wanted in the first paragraph, and then advertise it via Avahi. Great! Now when I type zeroconf:/ in the Konqueror address bar, I see the service. Reliably. Not like frickin SMB shares. That ftp server restarts, and in Konq I see it disappear for a sec and then reappear. Not only that, but when I yanked the ethernet cable out of my laptop, Avahi smartly switched the machine name to point to the same machine on the wireless net! So ftp://me@my-desktop.local:21/home/me continued to work. Sweet!