How to install and configure an FTP Server (vsFTP) on CentOS 6 in 5 minutes

vsftp e1349928599578

In an earlier post I gave a quick tutorial on how to transfer files using LFTP instead of rsync or scp, and I had a few questions about setting up a simple and easy FTP server to use LFTP with. The easiest way i’ve found to do this is by using VSFTP, and here’s how to do it.

To start off we will need to install vsftp, use the command below.

Install VSFTP

yum install vsftpd

Next we will need to make a few configuration changes.

Disable Anonymous FTP access

advertisement:
smyles 56 24
sMyl.es

anonymous_enable=NO

Enable ASCII

ascii_upload_enable=YES
ascii_download_enable=YES

Enable local users and chroot list

chroot_local_user=YES
chroot_list_enable=YES

Set chroot file to be used

chroot_list_file=/etc/vsftpd/chroot_list

Enable LS Recursive

ls_recurse_enable=YES

Here’s a few options you can choose to set or not. Just add these to the bottom of the configuration file.

Set FTP to use Local Time

use_localtime=YES

Set FTP root to different directory

Adding the line below will change the “home” directory for the FTP user. If not used the user’s home directory will become the FTP home directory.

local_root=public_html

Create chroot user list file

Open /etc/vsftp/chroot_list and add any users you want to be able to traverse their home directory. Basically if you want them to have access outside of their home directory.

nano /etc/vsftpd/chroot_list

Set vsFTP to start at boot

chkconfig vsftpd on

Start vsFTP

service vsftpd start
 
Source: sMyles
CentOS centos 6 centos 6 ftp centos6 ftp setup ftp ftp server hosting Linux Software Tutorials vps ftp local_root=public_html vsftp