Simply type the following command as a superuser (root) to install vsftp server:
# yum install vsftpd

Simply type the following command as a superuser (root) to install vsftp server:
# yum install vsftpd

Once vsftpd is installed, you can modify the configuration.

The default configuration file is /etc/vsftpd/vsftpd.conf file.

# vi /etc/vsftpd/vsftpd.conf

You need to change the anonymous_enable from YES to NO:

anonymous_enable=NO

To enable writing, directory listing and the directories to created with permission readwrite uncomment below sections in

local_enable=YES
write_enable=YES
local_umask=022

To enable users to be jailed to only specific directory enable below constants in vsftpd.conf

chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list

Then open the file /etc/vsftpd/chroot_list (if not present create it) and add the username to be jailed , by default the user in this list will be jailed to their home directory ex:- /home/jsmith

Type the following command to start the vsftp server at bootup:
# chkconfig vsftpd on

Type the following command to start the vsftp server:
# service vsftpd start

Type the following command to stop the vsftp server:
# service vsftpd stop

Type the following command to restart the vsftp server:
# service vsftpd restart

If you use iptables:

Open /etc/sysconfig/iptables file, enter:
# vi /etc/sysconfig/iptables

Append following line to open ftp port 21 before REJECT line:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT

Save and close the file. Restart the firewall:
# service iptables restart

Leave a Reply

Your email address will not be published. Required fields are marked *