Set up new user to use FTP, use $ sudo passwd only to change the password later if needed, $ sudo adduser will prompt you to create a password then.

$ sudo adduser username
$ sudo passwd username

Use the command below to ensure your Ubuntu server and all apps/modules are up to date.

$ sudo apt-get dist-upgrade

If VSFTPD is already installed, use snippet below to remove it and purge the previous config files.

$ sudo apt-get remove --purge vsftpd

Install VSFTPD with snippet below.

$ sudo apt-get install vsftpd

Use snippet below to edit the vsftpd.conf file.

$ sudo nano /etc/vsftpd.conf

While editing the vsftpd.conf file, uncomment the directives below to make vsftpd ‘work’

local_enable=YES
write_enable=YES
chroot_local_user=YES

Add the following directive at the end of your vsftpd.conf file:

allow_writeable_chroot=YES

Once you’re finished editing your vsftpd.conf file, be sure to restart vsftpd with the following command:

$ sudo service vsftpd restart

Use the snippet below to change your access to ‘superuser’ so that you may ‘jail’ the ftp user to a certain directory.

$ sudo su

Use this snippet to tell vsftpd what directory you want to ‘jail’ the ftp user to.

$ usermod --home /opt/bitnami/apps/yourappname/htdocs/ username

Also, be sure to set up an inbound rule in your AWS EC2 instance to all ftp traffic.

TCP/IP Protocol Custom Range 20-21 0:0:0:0:/0