How to Set Up vsftpd on CentOS 6

Vsftpd stands for Very Secure FTP Daemon. It is an efficient and very secure FTP server for Unix like systems including Linux.

Installation of vsftpd

 

For the installation of vsftpd on the virtual private server, type in the following command in your command line:

sudo yum install vsftpd

You also need to install the FTP client so as to make connections to an FTP server. For that, type in the following command:

sudo yum install ftp

Once the file is downloaded completely, vsftpd will be installed on your droplet. Even though it can provide access to anonymous users to your VPS, it will be configured with considerable level of security.

 

Configuring Vsftpd

 

Once you are done with the installation of vsftpd, you can configure it.

For that, open up the configuration file:

sudo vi /etc/vsftpd/vsftpd.conf

Search for the term ‘anonymous_enable’ in the configuration file and change it to ‘No’.

anonymous_enable=NO

Earlier, when it was set to ‘yes’, it could allow unidentified access to anonymous users in the server. Being a potential security threat, it is generally not recommended.

Now, uncomment the local_enable option in the file and change it to ‘yes’.

local_enable=YES

Now, let’s move on to the next change. Uncomment the chroot_local_user. If it is set to yes, all the local users will be jailed with in the chroot and will be denied acces to other part of the server.

chroot_local_user=YES

Now,restart vsftpd:

sudo service vsftpd restart

Make sure that vsftpd runs at the boot. For that run chkconfig:

chkconfig vsftpd on

 

Accessing FTP Server

 

Now that you have already installed and configured FTP, you can access it now.

Type the domain name in to your browser and log in with appropriate credentials. You can access the user’s home directory.

ftp://example.com

Another alternative way to reach the FTP server on your virtual server is by typing the following command on your command line:

ftp example.com

Now you can use the ‘exit’ command to exit from the FTP shell.

 

support2 has written 111 articles

Leave a Reply