How to setup VSFTPD on CentOS 7.x?

VSFTPD is an FTP server for Unix/Linux systems. It is a default FTP server on CentOS, RHEL Linux distributions, and other Linux OS. It also supports IPv6, TLS, and FTPS. Please refer to the following steps to install VSFTPD on Centos 7.x. 

  1. Log in to your Linux server with root or sudo user using SSH.

  2. Let us run the update before we proceed for the installation. 

    yum -y update
  3.  Install the VSFTPD with the below command. 

    yum -y install vsftpd
  4. We will edit the VSFTPD setup to configure it. Open the vsftpd.conf located at /etc/vsftpd/ directory. You can use your favorite editor for this. 

    vim /etc/vsftpd/vsftpd.conf
    Once the file is open, we need to make the below changes. 

  5. Disable the anonymous logins. This will prevent unidentified users from accessing files via FTP. Set the anonymous_enable to NO:

  6. Allow the login for the local users. It enables your local user accounts to function as FTP accounts. Set local_enable to YES:

  7. If you want to allow your local user to be able to write to a directory, set the write_enable to YES:

  8. We need to set chroot_local_user to yes. This option will deny your local users access to the other part of the server. Set the chroot_local_user to YES:

  9. Save all the changes and exit from the file. 

  10. Now, we will enable and restart the VSFTP service. 

    systemctl enable vsftpd
    systemctl restart vsftpd

You need to allow port 21 for VSFTP in the Linux firewall. Please refer to how to allow a port in a Linux firewall?

  1. Now we will create a user account and configure it to connect with FTP.

  2. Add a user with the below command.

    useradd demovps
  3. Set the password for the created user with the below command.

    passwd demovps
  4. Add the user to the VSFTP user list.

    echo “demovps” | sudo tee –a /etc/vsftpd/user_list
  5. Let us set the proper permission for the user folder.

    sudo chmod 750 /home/demovps/
    sudo chown -R demovps: /home/demovps/

Related Articles

How to Monitor Network Usage with nload in Linux?

You may need to monitor your network bandwidth usage on daily basis. In this case, nload will...

How to Install Joomla from Softaculous in cPanel?

Joomla is an open-source and a popular CMS. It is a very easy process to build a joomla template....

How to Run Multiple PHP versions with Nginx on Ubuntu?

You can run multiple php versions on Ubuntu without any issue. You require Multiple php versions...

How to Deploy Laravel Application with Nginx on Ubuntu?

Laravel is a PHP Framework and Nginx is a Web-Browser which can be installed on Ubuntu. Nginx is...

How to Compress and Extract Files Using the tar Command on Linux?

It is a very easy step to create archive files with .tar.gz or .tgz files. It is also called...

  • 0 Users Found This Useful

Was this answer helpful?