Quick Ubuntu Server FTP Setup with VSFTPD

THis is just a hastily put together post about how to quickly do an Ubuntu server FTP setup using VSFTPD.

I should quickly note that setting up an FTP server is not something I do very often, there are probably better ways to do it, and there are probably better people out there to advise you how to do it. The fact that you’re still reading this though probably implies you’re not going to go to those other sources to get your FTP-related goodness, so here it is…

Setting up Ubuntu with an FTP server couldn’t really be easier with VSFTPD, these instructions should work well no matter what release of Ubuntu server you’re using.

Update your packages list
Always a useful step – make sure you’re working from the latest package list.

Install VSFTPD
Well, it’s not going to work without it is it?

Configure VSFTPD
You weren’t going to get off that lightly, there is actually a little bit of work to be done! First, open up the VSFTPD config file with your chosen editor (mine’s nano).

First, make sure anonymous access is turned off by making sure the line reading the following is neither commented out nor has “YES” as the setting (if so, it should read as follows):

Rather appropriately, the next part allows local users to log in:

And finally, if you wish to let users modify files change the line for allowing write access to read:

Set up your users
In the simplest form of this setup the user’s home directory is what you see when you log in via FTP, therefore you can either create a new user and have their home directory (default is /home/username) as follows:

or specify a directory that you’ve created to act as the user’s home directory with:

once you’ve added you need to create and confirm a password for the user with:

Only one thing left to do…
Now you can restart the vsftpd service with the following command and test your new FTP server!

Further reading
For a more in-depth look at internet protocols, I recommend you check out The TCP/IP Guide – a fully loaded technical reference guide which goes into a lot more detail on FTP and other internet protocols.

  • Oh mighty lord Charlie, will this enable SFTP for me? Can I disable FTP and enable SFTP instead?

    P.S. do you want a sudo with that?

    • CharlieHawker

      Haha, good spot, yes, need to be either root or sudo all your commands.

      Post regarding configuration for SFTP coming soon…

  • Hi, Im not sure if this would help you or not but I have written a guide about how you can do this with pureftp on ubuntu server 12.04. You can set up different accounts which you can manage through mysql. As i said, im not sure if this is you wanted but I hope it helps