How To Set Up vsftpd on Ubuntu

VSFTPD program was built to have strongest protection against possible FTP vulnerabilities.It is authorized under the GNU General Public License. It is secure and very quick. In this tutorial, we will see how to install VSFTPD and how to setup VSFTPD for different uses on UBUNTU 15.04.

Install vsftpd

You can quickly install vsftpd on your virtual private server via command line:

apt-get install vsftpd

After the successful installation, we will move to the configuration part for some security issues and user management.

Configure vsftpd

To begin with the configuration, open the vsftpd.conf file by typing:

nano /etc/vsftpd.conf

Once the file is open the biggest change you need to make is to switch the Anonymous_enable from YES 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

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

Save and Exit that file.

With recent upgrade of vsftpd you may receive the following error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot().To resolve the issue, take the following steps:

Create a new directory within the user’s home directory

mkdir /home/username/files

Change the ownership of that file to root

chown root:root /home/username

Make all necessary changes within the “files” subdirectory and restart the service:

service vsftpd restart

Once you have installed the FTP server and configured it as per your choice, you can now access it.

 

Leave a Reply

Your email address will not be published. Required fields are marked *