
Basically, you create a database four tables in Mysql, put your users in the tables and then modify the configuration file for ProFTPD.
I remember I had trouble setting this up as you need to create a user or a group in your Linux OS for FTP (call it ftpgroup). That has to be in the table ftpgroup
Then you edit the config file for ProFTPD, as follows:
ServerName "- Welcome my FTP Server -"
ServerType standalone
DefaultServer on
DefaultRoot ~
ExtendedLog /var/log/proftpd
Port 21
Bind 127.0.0.1
#SocketBindTight On
Umask 022
MaxInstances 30
AllowStoreRestart on
AllowOverwrite on
DenyFilter \*.*/
User nobody
Group nogroup
SQLAuthTypes Crypt
SQLAuthenticate users* groups*
SQLConnectInfo database@host user password
SQLUserInfo ftp_users username passwd uid gid home shell
SQLGroupInfo ftp_groups groupname id username
SQLUserWhereClause "valid = 1"
SQLHomedirOnDemand on
#RequireValidShell off
SQLLog PASS updatelogin
SQLNamedQuery updatelogin UPDATE "count=count+1, lastlogin=NOW() WHERE username = \'%u\'" ftp_users
### Log trafic (STOR, RETR commands)
SQLLog RETR,STOR logtrafic
SQLNamedQuery logtrafic FREEFORM "INSERT INTO ftp_history (username, filename, transfertype, transfersize, transferhost, transfertime, transferdate) VALUES(\'%u\', \'%F\', \'%m\', %b, \'%a\', \'%T\', NOW())"
### Log user error events (ERR_* commands)
SQLLog ERR_* logevents
SQLNamedQuery logevents FREEFORM "INSERT INTO ftp_userevents (username, eventtype, description, eventdate) VALUES (\'%u\', \'%m\', \'%r\', NOW())"
AllowOverwrite on
RootLogin off
# Turn PAM auth off so we have no "rollback" if SQL fails
AuthPAM Off
I'll try to dig out the exact details of how I did this and upload this when I have a spare minute.
Sorry about the delay.
Nick
