How to configure ftp server on centos

FTP is a file transferring protocol used to transfer form one host to another over TCP.
Package used for ftp server is vsftpd (Very Secure FTP Daemon). It is able to handle number of connections efficiently and securely. It uses port 21.

FTP server is used in wide area network. No mounting is needed. File uplod and download can be possible. FTP server offers two types of login, which are anonymous login and local user login.


Step 1: Install vsftpd package

       [root@centos6 ~]# yum install vsftpd

Step 2: After install vsftpd package open configuration file and edit the file as following.

       [root@centos6 ~]# vim /etc/vsftpd/vsftpd.conf 





      Note: If 'anonymous_enable=YES', anyone can access ftp server without username and password.

Step 3: Create a folder where to store ftp data. In my case I am going to install folder under '/' directory.

       [root@centos6 /]# mkdir FTP-Share

Step 4: Create a ftp user with home directory as above created folder

       [root@centos6 /]# useradd -d /FTP-Share/alleria alleria
       [root@centos6 /]# passwd alleria

Step 5: Start the vsftpd service and add on startup

       [root@centos6 /]# service vsftpd start
       [root@centos6 /]# chkconfig vsftpd on

Step 6: Now test ftp. I created a file under user alleria's home directory.

       [root@centos6 /]# cd FTP-Share/alleria/
       [root@centos6 alleria]# touch alleria.txt

No comments:

Powered by Blogger.