How to install and configure an FTP Server (vsFTP) on CentOS 6 in 5 minutes
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
1 |
yum install vsftpd |
Next we will need to make a few configuration changes.
Disable Anonymous FTP access
1 |
anonymous_enable=NO |
Enable ASCII
1 2 |
ascii_upload_enable=YES ascii_download_enable=YES |
Enable local users and chroot list
1 2 |
chroot_local_user=YES chroot_list_enable=YES |
Set chroot file to be used
1 |
chroot_list_file=/etc/vsftpd/chroot_list |
Enable LS Recursive
1 |
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
1 |
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.
1 |
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.
1 |
nano /etc/vsftpd/chroot_list |
Set vsFTP to start at boot
1 |
chkconfig vsftpd on |
Start vsFTP
1 |
service vsftpd start |
Pingback: Using LFTP (FTP) to mirror/transfer files from one server to another « sMyl.es()