How TO INSTALL AND CONFIGURE FTP ON UBUNTU

ftpubuntuserver1

 

 

1. You can quickly install vsftpd on your virtual private server in the command line:

sudo apt-get install vsftpd

vsftpd stands for Very Secured Ftile Transfer Protocol

2. Edit configuration file of vsftpd

sudo nano /etc/vsftpd.conf

3. The change you need to make is to switch the Anonymous_enable from YES to NO:

anonymous_enable=NO

4. After that, uncomment the local_enable option, changing it to yes and, additionally, allow the user to write to the directory.

local_enable=YES
write_enable=YES

5. Finish up by uncommenting command to chroot_local_user. When this line is set to Yes, all the local users will be jailed within their chroot and will be denied access to any other part of the server.

chroot_local_user=YES

6. Save and Exit that file.

7. sudo service vsftpd restart

8. Create a new user for FTP with home directory

adduser username –home /path/to/directory –shell /bin/bash
If you face below error
500 OOPS: vsftpd: refusing to run with writable root inside chroot ()

then you need to upgrade your vsftpd

To upgrade vsftpd follow below mentioned steps

1. echo “allow_writeable_chroot=YES” >> /etc/vsftpd.conf

2. sudo add-apt-repository ppa:thefrontiergroup/vsftpd

3. sudo apt-get update

4. apt-get install vsftpd

5. sudo service vsftpd restart

44 Comments