VSFTPD - How To Install & Configure on Ubuntu 14.04

FTP (File Transfer Protocol) is probably the most popular method of uploading files to a server; a wide array of FTP servers, such as vsftpd, and clients exist for every platform.

Pre-Flight Check

 * These instructions are intended specifically for installing the vsfptd on Ubuntu 14.04 LTS.
 * I’ll be working from a Liquid Web Core Managed Ubuntu 14.04 LTS server, and I’ll be logged in as root.

Step 1: Install vsftpd
Warning: FTP data is insecure; traffic is not encrypted, and all transmissions are clear text (including usernames, passwords, commands, and data). Consider securing your FTP connection with SSL/TLS.

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

Then let’s install vsftpd and any required packages:

Step 2: Configure vsftpd
For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor

Let’s edit the configuration file for vsftpd:

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

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

If you want local user to be able to write to a directory, then change the write_enable setting to 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 :

Exit and save the file with the command :wq.

Restart the vsftpd service:

Step 3: Configure the User’s Home Directory
With certain version of vsftpd you may receive the following error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot.

Not to worry! Create a new directory for the user receiving the error ( user2 in this case) that is a subdirectory of their home directory ( /home/user2 ). For example:

Fix permissions for user2 ‘s home directory:

Make a new directory for uploading files:

Source: http://www.liquidweb.com/kb/how-to-install-and-configure-vsftpd-on-ubuntu-14-04-lts/