Setup VSFTP on Ubuntu 14.04 LTS

Here is how I setup VSFTP on Ubuntu 14.04 LTS. I needed access to the web files on this particular server and set it up accordingly.

The group used in this setup is “ftpuser”

The username used in this setup is also “ftpuser”

Install vsftp
sudo apt-get install vsftpd
Configure vsftpd – Be sure to uncomment “write_enabled”
sudo nano /etc/vsftpd.conf
Setup FTP User – be sure to use something other than password here
sudo useradd \-d /var/www \-s /usr/sbin/nologin ftpuser
sudo passwd ftpuser
password
Give FTP User correct permissions – If you don’t have www folders, you should probably make some ftp root folders here instead
sudo chown \-R ftpuser /var/www
sudo chmod 775 /var/www
Create userlist file and add the user:
sudo nano /etc/vsftpd.userlist
Add following lines to vsftpd.conf
# the list of users to give access
userlist_file=/etc/vsftpd.userlist
# this list is on
userlist_enable=YES
# It is not a list of users to deny ftp access
userlist_deny=NO
Add “/usr/sbin/nologin” to the end of /etc/shells
sudo nano /etc/shells
Now create a usergroup and add the ftpuser to it:
sudo addgroup ftpusers
sudo usermod \-Gftpusers ftpuser