tar xzvf proftpd-1.3.1.tar.gz
cd proftpd-1.3.1
Configure using:
install_user=root install_group=wheel ./configure --with-modules=mod_sql:mod_sql_mysql:mod_quotatab:mod_quotatab_sql --with-includes=/usr/include/mysql/ --with-libraries=/usr/lib/mysql/ --enable-timeout-linger --enable-timeout-stalled --sysconfdir=/etc --localstatedir=/var --prefix=/usr
make & make install Create the /etc/init.d/proftpd as
| #!/bin/sh # $Id: proftpd.init,v 1.1 2004/02/26 17:54:30 thias Exp $ # # proftpd This shell script takes care of starting and stopping # proftpd. # # chkconfig: - 80 30 # description: ProFTPD is an enhanced FTP server with a focus towards \ # simplicity, security, and ease of configuration. \ # It features a very Apache-like configuration syntax, \ # and a highly customizable server infrastructure, \ # including support for multiple 'virtual' FTP servers, \ # anonymous FTP, and permission-based directory visibility. # processname: proftpd # config: /etc/proftp.conf # pidfile: /var/run/proftpd.pid # Source function library.  # Source networking configuration.  # Check that networking is up.  [ -x /usr/sbin/proftpd ] || exit 0 RETVAL=0 prog="proftpd" start() {  stop() {  # See how we were called.  exit $RETVAL | 
chmod 755 /etc/init.d/proftpd
| ServerName "FTP Server"  DisplayLogin .welcome # Textfile to display on login  UseReverseDNS off  Port 21  User nobody  ScoreboardFile /var/proftpd/proftpd.scoreboard AllowStoreRestart on  # Some logging formats  # Define log-files to use  # Set up authentication via SQL  # Log the user logging in  # logout log  # display last login time when PASS command is given  # xfer Log in mysql  # Normally, we want users to do a few things. | 
Create /etc/logrotate.d/proftpd as
| /var/log/proftpd/*log { compress missingok postrotate test -f /var/lock/subsys/proftpd && /usr/bin/killall -HUP proftpd endscript } /var/log/proftpd/proftpd.mysql { compress missingok postrotate test -f /var/lock/subsys/proftpd && /usr/bin/killall -HUP proftpd endscript } | 
Dowload proFTPd Administrator (http://proftpd-adm.sourceforge.net/)
mv proftpd_admin_v1.2/ proftpd_admin/
cd proftpd_admin
| #!/bin/bash USER=$1 USER_ID=$2 GROUP_ID=$3 mkdir -p --mode=775 /ftp/$USER  | 
Then :
chown -R root.root /var/www/html/proftpd_admin/misc/user_script 
chmod 700 -R /var/www/html/proftpd_admin/misc/user_script 
edit /etc/sudoers files and add the following 2 lines at the end
# Cmnd alias specification 
Cmnd_Alias CREATE_USER = /var/www/html/proftpd_admin/misc/user_script/create_user.sh 
# User privilege specification 
apache ALL=(ALL) NOPASSWD: CREATE_USER 
Securing Installation of Proftpd Admin
vi /etc/httpd/conf.d/dirSecurity.conf
| # Secure proftpd_directory both by ip and password <Directory "/var/www/html/proftpd_admin"> deny from all  Order deny,allow Allow from <any safe IP> AuthType Basic AuthUserFile /etc/httpd/conf/proftpd.htpasswd AuthName Administration require valid-user satisfy All </Directory> | 
Then execute
htpasswd -b -c /etc/httpd/conf/proftpd.htpasswd proftp <password>
/etc/init.d/httpd restart
/etc/init.d/mysqld restart
/etc/init.d/proftpd start
And point your browser to http://<server-ip>/proftpd-admin and supply the username & password you created.
Go to the Configure Tab and then the ProFTPd tab and set
Create user command: sudo /var/www/html/proftpd_admin/misc/user_script/create_user.sh
REFERENCE

