Linux « Apache + user directory (http://addresss.com/~user/) | HOME | CGI - Syntax check »
(Cent OS 4.4)
Install
# rpm -Uvh http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el4/en/i386/RPMS.dries/
rpmforge-release-0.2-2.2.el4.rf.i386.rpm
Add yum repository to install ProFTPD
# nano /etc/yum.repos.d/rpmforge.repo
enabled = 0 (Not default for yum update)
If vsftpd is installed, remove it before install. Otherwise it conflicts with proftpd.
# yum remove vsftpd
# yum -y --enablerepo=rpmforge install proftpd
Download ProFTPD from rpmforge
Setup
# nano /etc/proftpd.conf
ServerAdmin
ServerName
DefaultRoot ~ !adm
↓
DefaultRoot ~/ftp !wheel (Root directory is /user/ftp/. But exception is wheel group or specify group name)
# TLS
# Explained at http://www.castaglia.org/proftpd/modules/mod_tls.html
TLSEngine on
#TLSRequired on (Allow only TSL connection)
TLSRSACertificateFile /usr/share/ssl/certs/proftpd.pem
TLSRSACertificateKeyFile /usr/share/ssl/certs/proftpd.pem
TLSCipherSuite ALL:!ADH:!DES
TLSOptions NoCertRequest
TLSVerifyClient off
#TLSRenegotiate ctrl 3600 data 512000 required off timeout 300
TLSLog /var/log/proftpd/tls.log
(Add below at last)
# For access log
ExtendedLog /var/log/proftpd/access.log WRITE,READ default
# For authentication log
ExtendedLog /var/log/proftpd/auth.log AUTH auth
# JP timestamp
TimesGMT false
# Indicate server name, Global IP address or server name
MasqueradeAddress 10.81.255.11
# For passive mode, indicate preferred port other than 1-1024
PassivePorts 60000 60030
TimeoutIdle 300
TimeoutLogin 120
AllowStoreRestart on (resume for upload)
AllowRetrieveRestart on (resume for download)
<Limit Login>
Order allow,deny
AllowUser tomo,tomo2 (write user who can use FTP)
Deny all
</Limit>
When create user copy below file to the directory. then user timestamp will be changed to JP time.
# cp /etc/localtime /etc/user/public_html/etc
Create Certification for SSL connection
# cd /usr/share/ssl/certs
# make proftpd.pem
(Common name should be FTP server name.)
# /etc/rc.d/init.d/proftpd start
# chkconfig proftpd on
If necessary, open the port 21, 60000-60030 on the Router.
-----------------
reference
http://www.infoscience.co.jp/technical/proftpd/

