How to Install and Configure vsftpd on Ubuntu 14.04 LTS

Step 1: Install vsftpd

First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.

apt-get update

Then let’s install vsftpd and any required packages:

apt-get -y install vsftpd

Step 2: Configure vsftpd

Let’s edit the configuration file for vsftpd:

nano /etc/vsftpd.conf

Disallow anonymous, unidentified users to access files via FTP; change the anonymous_enable setting to NO:

anonymous_enable=NO

Allow local uses to login by changing the local_enable setting to YES:

local_enable=YES

If you want local user to be able to write to a directory, then change the write_enable setting to YES:

write_enable=YES

Local users will be ‘chroot jailed’ and they will be denied access to any other part of the server; change the chroot_local_user setting to YES:

chroot_local_user=YES

Exit and save the file.

Restart the vsftpd service:

service vsftpd restart

Step 3: Configure the User’s Home Directory

useradd user &&  mkdir /home/user

Fix permissions for user's home directory:

chmod a-w /home/user/

Make a new directory for uploading files:

mkdir /home/user/files
chown user:user /home/user/files/

Last modified: September 01 2017 19:39:04