Securing an FTP server on Ubuntu

As some of you might notice i setup a new blog recently, and with that, the most important thing needs to be dealt with, backups.  My blog is running WordPress, and i used one of the numerous backup plugins from the repository.  One of those options for backup is FTP of the files.  I like having a copy of things on my home network, so i decided to setup an FTP server on my Ubuntu machine.

Setting up an FTP on Ubuntu is really really simple

sudo apt-get install vsftpd

I chose vsftp since it has good reviews, is easy to setup via the repository and is known for strong security.

Once you have run the install, you can edit the configuration of vsftp with your favorite editor ( mine’s vim )

sudo vi /etc/vsftpd.conf

There are a couple changes I strongly recommend you make the following changes

uncomment the following lines

local_enable=YES # this allows only users that have an account on the machine to login via FTP

write_enable=YES # this allows authorized users to write to the FTP server not only read

chroot_local_user=YES # this locks users to their home directory

Once this is setup,  I proceeded to create a “throwaway” account for the WordPress backups with a strong password.  Once the account is setup, the WordPress backup plugin copies the backups to this account, and i move them to somewhere else using a script.

Scan to Donate Bitcoin to Tim
Did you like this?
Tip Tim with Bitcoin

Tim Voet has been in the IT industry since 1997. Tim started his career doing tech support and network administration at a large Pharma company. He then spent the next 12 years doing development, leading and managing development teams, mostly in Java, but also some PHP, and Ruby on Rails. Tim has always hands on, and loves challenges that make most people cringe. When he isn't at work, he's spending as much time as he can with his wife and 3 boys. Life can be a busy time with that many young kids. He is currently open to new consulting opportunities, please feel free to contact him with your project information tim - at - timvoet dot com


  1. Nice post. Good idea to talk about it.

  2. Excellent blog. This will definatly be a factor in deciding our next vps.

Leave a Reply

Your email address will not be published. Required fields are marked *