How to install FTP, create user, and configure FTP directory (Ubuntu)

This guide shows you how to create a new user on your system that has FTP access to their home directory. SSH and navigating to areas outside of home are not permitted.

Install vsftpd:

sudo apt-get update
sudo apt-get install vsftpd

Make an FTP user (ftpguy in my examples):

sudo useradd ftpguy -m
sudo passwd ftpguy

Edit /etc/vsftpd.conf and change these three lines

sudo vi /etc/vsftpd.conf


Restart for changes to take effect

sudo /etc/init.d/vsftpd restart

The user’s home directory can’t have write permissions in order for chroot to work

chmod a-w /home/ftpguy

You must create the folder(s) within their home directory that they can write to

mkdir /home/ftpguy/WriteableDirectory
chown ftpguy.ftpguy /home/ftpguy/WriteableDirectory

To revoke SSH permissions for the user (so they can use FTP only):

sudo echo "DenyUsers ftpguy" >> /etc/ssh/sshd_config
sudo restart ssh