Install and configure VSFTPD on Ubuntu

Ubuntu

As the name suggest ‘Very Secure File Transfer Protocol Deamon’ (VSFTPD) is one of the most secure FTP daemons available, vsftpd is used as the default FTP server in the Ubuntu, CentOS, Fedora, NimbleX, Slackware and RHEL Linux distros. It is authorized under the GNU General Public License. It is secure and very quick. It is stable. VSFTPD is a developed and trusted arrangement which sustains virtual clients with PAM (pluggable confirmation modules). In this tutorial, we will see how to install VSFTPD and how to setup VSFTPD for different uses on UBUNTU.

Installation

For the installation, you need to enter the following command:

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

Configuration

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

Disable anonymous login and allow local users to write

The very first change we will be making in the config file is:

This will prevent anonymous login from unidentified users. Which can prevent many security issues. Then just find the following lines and uncomment them:

The change above will allow local users to login and allow the users to write to the directory.

Chroot users

Now there are multiple options available for chrooting users. Search “chroot_local_users” and select one of these as per your needs:

The above will chroot all the users.

This will allow you to chroot some particular users. You will have to create a file /etc/vsftpd.chroot_list with a list of usernames that you want to chroot.

All the users will be free of chroot except some. Create a file /etc/vsftpd.chroot_list with a list of usernames that you want under chroot.

Allowing and denying users from logging

To deny some particular users to login add these lines to the file:

Then create a file vsftpd.denied_users and add denied users to it just by adding one user per line. The above will help to deny some particular users from login. You can allow some particular list of users by adding the following to the code:

Then create a file vsftpd.allowed_users and add all the usernames, one per line, that you want to allow.

Configuring TLS/SSL/FTPS

If you connect to your system remotely then you should go through these settings thoroughly, or else your passwords will be sent in plain text. Just make sure to add these options to your config file, some of them are already available check those and then change the options.

This will be it with the basic configuration part.

To apply the above settings just close your config file and type:

Restarting the service will use the new settings and you are done 🙂

Source

Share: