Discussion of this wiki can be found here

This tutorial will cover setting up ridiculously easy, reliable, cross platform, standards based home networking. You will be able to share files from any Ubuntu/Debian system and connect to them from any Linux, Windows or OS X box. If you want to share your files on a firewalled home network but don't want to bother with Samba, NFS, or AFP this is for you.

Setting up the FTP daemon

We will use vsftpd (Very Secure FTP Daemon) as our FTP server.

Install vsftpd

sudo apt-get install vsftpd

1. Configuring vsftpd

We need to modify some vsftpd settings. (Users of Ubuntu 12.4 will find that this method needs amending, The amending is fairly simple. in the vsftpd.conf file -do NOT uncomment the "#chroot_local_user=YES" line. -immediately after that line add "local_root=/home/{name}/Public" where {name} is the name on the user's home folder and "Public" can either be the Public folder installed by default in Ubuntu or any other subfolder you want... it just cannot be the home folder. (vsftp does not want you connecting with write privileges directly to the home folder)

Also, you'll find it is not necessary to load Avahi at all. In the Nautilus file manager window you can go to the 'File" menu and click 'connect to server' and enter the proper information. Once you connect, "Bookmark" the connection and it will not only always be there in the Nautilus side pane, but you can also go the directly from the Unity Launcher by right clicking on the folder icon, then on the bookmarked link.)

To edit your configuration file by hand, open the configuration file with

gksudo gedit /etc/vsftpd.conf

Change or uncomment (remove the #) the following parameters

    local_enable=YES
    write_enable=YES
    anonymous_enable=NO
    chroot_local_user=YES

2. Start vsftpd

sudo /etc/init.d/vsftpd restart

Vsftpd will now always start automatically when your computer starts.

Setting up Zeroconf

Install Avahi

sudo apt-get install avahi-daemon avahi-discover avahi-utils libnss-mdns service-discovery-applet mdns-scan

If all you want is convenient host naming that allows you to use DNS names (ie. hostname.local) without setting up your own DNS server, you can skip the next section. Instructions are provided for connecting to shared files with and without zeroconf service announcements.

Create Zeroconf Service Announcements (Optional)

gksudo gedit /etc/avahi/services/ftp.service

and paste

    <?xml version="1.0" standalone='no'?>
    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service-group>
    <name>FTP file sharing</name>
    <service>
    <type>_ftp._tcp</type>
    <port>21</port>
    </service>
    </service-group>

Save and close Gedit.

Restart Avahi

sudo /etc/init.d/avahi-daemon restart

Repeat!

Connecting to your shared files

Connect from Ubuntu/Debian (or any Gnome desktop)

With zeroconf service announcements

Without zeroconf service announcements

Connect from OS X

Without zeroconf service announcements

With zeroconf service announcements

Connect from Windows

Install Bonjour

Download Apple's Bonjour for Windows here. Run the setup like any other; answer Next, Yes and OK to every question. After your computer restarts, you will have full zeroconf naming support.

With Explorer

With NetDrive

Success!

Conclusion

Originally posted The Ubuntu Forums (ubuntuforums.org)

EasyHomeFileSharingWithFTPAndZeroconf (last edited 2012-07-18 10:54:35 by host86-130-25-119)