If you're looking to really speed things up in proftp, increase security & logging--implement the following:
Code:
touch /var/log/proftp-access.log
touch /var/log/proftp-auth.log
touch /var/log/proftp-paranoid.log
chmod 0640 /var/log/proftp-*
chown root.root /var/log/proftp-*
Code:
touch /etc/logrotate.d/proftpd
chown root.root /etc/logrotate.d/proftpd
chmod 0640 /etc/logrotate.d/proftpd
The following 'code' should be placed in the newly created /etc/logrotate.d/proftpd
Code:
/var/log/proftp-access.log {
create 0640 root root
postrotate
/usr/bin/killall -HUP proftpd
endscript
}
/var/log/proftp-auth.log {
create 0640 root root
postrotate
/usr/bin/killall -HUP proftpd
endscript
}
/var/log/proftp-paranoid.log {
create 0640 root root
postrotate
/usr/bin/killall -HUP proftpd
endscript
}
This code should replace the cPanel proftpd.conf file in /etc. Be sure to only replace the config stuff near the top of the file (top of the file all the way to the bottom of the anonymous ftp config stuff), keeping your virtual ftp entries in place.
Code:
ServerName "FTP Service"
ServerType standalone
ServerAdmin admin@domain.com
DeferWelcome on
DefaultServer on
UseReverseDNS off
Port 21
MaxInstances 30
Umask 022
TimeoutLogin 120
TimeoutIdle 600
TimeoutNoTransfer 900
TimeoutStalled 3600
LogFormat default "%h %u %t \"%r\" %s %b"
LogFormat auth "%h %t \"%r\" %s"
LogFormat write "%h %u %t \"%r\" %s %b"
LogFormat BytesLog "%b"
MultilineRFC2228 on
DisplayConnect /etc/issue.net
DefaultRoot ~ !wheel
User nobody
Group proftpd
AuthUserFile /etc/proftpd/passwd.vhosts
<Global>
DisplayLogin welcome.msg
DisplayFirstChdir message
MaxClients 30
AllowOverwrite on
IdentLookups off
ExtendedLog /var/log/proftp-access.log read,write
ExtendedLog /var/log/proftp-auth.log auth
ExtendedLog /var/log/proftp-paranoid.log all default
</Global>
<Directory /*>
AllowOverwrite on
</Directory>
<Anonymous ~ftp>
User ftp
Group ftp
UserAlias anonymous ftp
UseFtpUsers on
RequireValidShell off
AnonRequirePassword on
HideUser root
HideGroup root
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Limit LOGIN>
AllowAll
</Limit>
<Directory public_ftp/incoming>
<Limit STOR>
AllowAll
</Limit>
<Limit WRITE DIRS READ>
DenyAll
</Limit>
<Limit CWD XCWD CDUP>
AllowAll
</Limit>
</Directory>
<Directory /*>
<Limit ALL>
DenyAll
</Limit>
</Directory>
<Limit WRITE>
DenyAll
</Limit>
</Anonymous>
I haven't really tested the anonymous FTP section of the above config since I don't have that enabled on the machines I admin. However if you have issues, remove:
Code:
<Directory /*>
<Limit ALL>
DenyAll
</Limit>
</Directory>
from the above.
After all of these changes, killall -HUP proftpd as root. Also keep in mind that you can't use the enable/disable anonymous FTP feature in the FTP tweak settings feature in WHM as it will mess up my config. You will have to mod the config file manually.