Search Windows and Linux Networking

Wednesday, February 8, 2012

How to Install and Configure Proftpd Server on CentOS Step by Step


Installing Proftpd Server on CentOS (Linux)
 
Proftpd is the Highly configurable GPL-licensed FTP server software .it is an enhanced, secure and highly configurable FTP server. Its configuration syntax is very similar to apache web server. You can know more information from http://www.proftpd.org .

Download proftpd rpm package from http://pkgs.org/ and install with rpm –ivh <Package name>.rpm

OR

If you want to install using yum then add repository  and then install proftpd server

#  cd /etc/yum.repos.d/
# wget http://centos.karan.org/kbsingh-CentOS-Extras.repo
# rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
# Vi /etc/yum.repos.d/ kbsingh-CentOS-Extras.repo
Set both enable=1
# yum clean all
# yum update all

Now install Proftpd

# yum install proftpd

Now your ftp server is ready to functional  with default configuration but you should check following values for your Basic ftp server in /etc/proftpd.conf configuration file

Server Name, Server Type and Port

Now start proftpd and set on for startup

# service proftpd start
# chkconfig proftpd on

Check running process for proftpd
# ps -ef | grep proftpd
nobody    4463     1  0 23:35 ?        00:00:00 proftpd: (accepting connections)
root      4470  4202  0 23:36 pts/2    00:00:00 grep proftpd

OR you can verify whether your FTP server is running using:

# netstat -an | grep -F tcp | grep -F LISTEN | grep -F 21
tcp        0      0 :::21                       :::*                        LISTEN


Now when you try to connect ftp server it will be ask you for your name and password type valid user name and password as per /etc/passwd file . it will take you home directory of that user. 

Anonymous FTP Server :-

If you wanted Anonymous access uncomment Anonymous directive. Or you can add following in /etc/proftpd.conf file
# vi /etc/proftpd.conf

<Anonymous /var/ftp/pub>
AnonRequirePassword       off
User                                   ftp
Group                                 ftp
RequireValidShell                off
<Directory *>
<Limit WRITE>
          DenyAll
</Limit>
</Directory>
</Anonymous>


 Note: - user and group must be valid

verify configuration :-

# proftpd –t6

If it not given any error then reload configuration

# service proftpd reload

Now if you try to access FTP server it will not ask you any password and show you contain of /var/ftp/pub directory.
If you wanted to allow user to upload data then in Limit WRITE directive change it AllowAll.

No comments:

Post a Comment