How to create FTP server in Centos? (vsftp)

Create a FTP server in Linux Centos with vsFtp.

1.  Install vsftpd

$ yum install vsftpd

This will install vsftpd server.

2. Configuration:

Open config file  by :

$ vi /etc/vsftpd/vsftpd.conf

a) Disable anonymous login :

anonymous_enable = no

b) Disable user to go out side their assigned directory.

chroot_local_user = yes

3) Restart the ftp  server:

$ service vsftpd restart

4) Make sure it starts on server reboot, so in command line:

$ chkconfig vsftpd on

Creating user and assigning folders to the users for FTP:

Steps:

a) Create user:

Lets create user with ftpuser as user name, ftppassword as password and assign it to the group ftpgroup  with folder /ftp/ftpuser

$ groupadd ftpgroup

b) Add new user

$ adduser -g ftpgroup -d /ftp/ftpuser ftpuser

passwd ftppassword

c) Set the ownership of user to folder

$ chown ftpuser:ftpgroup /ftp/ftpuser

d) Give read write permission

$ chmod 755 /ftp/ftpuser

e) In /etc/vsftpd/vsftpd.conf  uncomment

local_enable = yes

f) Restart vsftpd

service vsftpd restart

Advertisements

One thought on “How to create FTP server in Centos? (vsftp)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s