Ok I have solved this problem. But as there is no english solution available I will provide one (Thanks to the German posters on this forum, I translated). This solution is taken from ProFTPd Frontend v1.0 available from xampp addons (Though it is german). Provided are 2 MySQL Tables. If using PHPAdmin (As I presume most are) open a database (or create one) then copy paste this into the SQL box.
# Table for logging any files transfered!
- Code: Select all
CREATE TABLE `ftp_transfer` (
`username` tinytext collate latin1_german1_ci,
`filename` text collate latin1_german1_ci,
`size` bigint(20) default NULL,
`host` tinytext collate latin1_german1_ci,
`ip` tinytext collate latin1_german1_ci,
`action` tinytext collate latin1_german1_ci,
`duration` tinytext collate latin1_german1_ci,
`local_time` datetime default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;
# Table for all users. Fairly self explanatory.
- Code: Select all
CREATE TABLE `ftp_users` (
`userid` varchar(255) collate latin1_german1_ci NOT NULL default '',
`uid` int(5) NOT NULL default '65534',
`gid` int(5) NOT NULL default '65534',
`passwd` varchar(255) collate latin1_german1_ci NOT NULL default '',
`shell` varchar(20) collate latin1_german1_ci NOT NULL default '/bin/sh',
`homedir` varchar(255) collate latin1_german1_ci NOT NULL default '/opt/lampp/htdocs',
`note` text collate latin1_german1_ci,
`count` int(11) NOT NULL default '0',
`admin` int(1) NOT NULL default '0',
`enabled` int(1) NOT NULL default '0',
`last_login` datetime default NULL,
`dl_bytes` bigint(20) NOT NULL default '0',
`ul_bytes` bigint(20) NOT NULL default '0',
UNIQUE KEY `userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;
# Example insert to create the account nobody in the SQL table
- Code: Select all
INSERT INTO `ftp_users` VALUES ('nobody', 65534, 65534, 'nobody', '', '/opt/lampp/htdocs/', '', 0, 0, 1, '0000-00-00 00:00:0', 0, 0);
#The following lines need to be added to proftpd.conf Make sure you alter the SQLConnectInfo line!
- Code: Select all
# <datebase>@<host> <user> <password>
SQLConnectInfo proftpd@localhost ftp ftp
# Nothing need be changed after here if you are using the above table configuration
SQLAuthenticate users*
SQLAuthTypes plaintext
SQLUserWhereClause "enabled = '1'"
SQLUserInfo ftp_users userid passwd uid gid homedir shell
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "count=count+1 WHERE userid='%u'" ftp_users
SQLLog PASS lastlogin
SQLNamedQuery lastlogin UPDATE "last_login=now() WHERE userid='%u'" ftp_users
SQLLog RETR dlbytescount
SQLNamedQuery dlbytescount UPDATE "dl_bytes=dl_bytes+%b WHERE userid='%u'" ftp_users
SQLLog STOR ulbytescount
SQLNamedQuery ulbytescount UPDATE "ul_bytes=ul_bytes+%b WHERE userid='%u'" ftp_users
SQLLog RETR,STOR transfer
SQLNamedQuery transfer INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T', now()" ftp_transfer
Hope this helps, it's a standard configuration to get started. If you have any questions reply and I'll see if I can help. Alternatively get ProFTPd Frontend, It's German but it's dam good!