HostOnNet Blog

Install vsftpd on CentOS

vsftpd is an FTP server. To install vsftp on CentOS, run

yum -y install vsftpd

Make it start on boot with

chkconfig vsftpd on

Start FTP Server with

service vsftpd start

Now system users will be able to login, lets create a user, set it a password.

useradd -m ftpuser
passwd ftpuser

Exmaple

[root@localhost ~]# useradd -m ftpuser
[root@localhost ~]# passwd ftpuser
Changing password for user ftpuser.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@localhost ~]# 

Now you will be able to use this user and password to login to FTP user.

chroot

By default FTP user will be able to navigate to any folder. This is not desirable if you have more users on the server. To avoid this, we can enable chroot.

Edit vsftpd.conf file

vi /etc/vsftpd/vsftpd.conf

In the file, add

chroot_local_user=YES

Restart vsftpd.

service vsftpd restart

Posted in CentOS