1. Using SSH or the terminal on the Pi enter the following commands.
sudo apt-get update
sudo apt-get install vsftpd
2. Now open up the config file by entering the following command:
sudo nano /etc/vsftpd.conf
3. In here add or uncomment(Remove the #) for the following settings.
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=YES
user_sub_token=$USER
local_root=/home/$USER/ftp
4. Now we need to create the FTP directory so we can transfer files. The root directory is not allowed to have write permissions so we will need a sub folder called files. If you try to copy to FTP it won’t work but FTP/files will. Replace <user> with the relevant user, for example
mkdir /home/<user>/FTP
mkdir /home/<user>/FTP
chmod a+w /home/<user>/FTP
5. Now restart the service by entering the following command:
sudo service vsftpd restart