Proftpd with backend mysql on Mac Os X 10.4
Proftpd is a very good FTP Server, using the mysql backend you can create login accounts simply inserting a line into a table. This is very usefull if you plan to create interaction between a web application and the FTP service. In Mac Os X 10.4 the inetd support was removed, you have to configure it to run in standalone mode into the proftpd.conf file.
ProFTPd with Mysql Back-end on Mac OS X

What I need:

a> Mac os X Developer tools:
b> MySQL (
c> ProFTPd: -

a> Developer Tools
First of all you have to verify that Developer tools are installed. (from the root verify if  /Developer folder is present). You can download tools at  then install it as a standard package (require an Administrator's password).

With the developer kit you can compile source code.

b> MySQL
Follow the guide and install the package, the guide is available in italian at

c> ProFTPd


Now you can compile and configure ProFTPd.

curl -O
tar xzvf proftpd-1.2.9.tar.gz
cd proftpd-1.2.9
./configure --with-modules=mod_sql:mod_sql_mysql --with-includes=/usr/local/include --with-libraries=/usr/local/lib/mysql
make install

ONow that you have proftpd installed you have to configure the mysql back-end. Download the SQL file with database creation and execute it with phpmyadmin.





SQL file content:
# Database : `proftpd`

# --------------------------------------------------------

# Table structure for table `ftpusers`

CREATE TABLE `ftpusers` (
`loginallowed` char(1) NOT NULL default 'Y',
`username` varchar(60) NOT NULL default 'NULL',
`uid` int(11) unsigned default '1000',
`gid` int(11) unsigned default '1000',
`groupname` varchar(50) default 'ftp',
`password` varchar(30) default 'NULL',
`homedir` varchar(255) default '/Users/ftp/default/',
`shell` varchar(15) NOT NULL default '/sbin/nologin',
`count` int(11) unsigned default '0',
`fretr` int(10) unsigned default '0',
`bretr` int(10) unsigned default '0',
`bstor` int(10) unsigned default '0',
`fstor` int(10) unsigned default '0',
`ftime` timestamp(14) NOT NULL,
`faddr` varchar(255) default 'NULL',
`fhost` varchar(255) default 'NULL',
`fcdir` varchar(255) default 'NULL',
PRIMARY KEY (`username`)

Create a mysql user for the connection to the back-end mysql and remember to set the password in old_password.

Change the configuration file of proftpd in /usr/local/etc/proftpd.conf to match your system
A sample file is available to
This is a sample config:
ServerName "KDEV"
ServerType standalone
DefaultServer on
Port 21
Umask 022
MaxInstances 15
User ftp
Group ftp
PassivePorts 49152 49999
UseReverseDNS off
IdentLookups off

SQLAuthenticate on
SQLUserInfo ftpusers username password NULL NULL homedir shell
SQLAuthTypes Plaintext Backend
SQLConnectInfo proftpd@localhost:3306 proftpd password <--- insert your username and password
SQLUserWhereClause "LoginAllowed = 'Y'"
SQLDefaultGID 1000
SQLDefaultUID 1000
SQLGroupInfo ftpusers groupname gid username
SQLHomedirOnDemand on
SQLDefaultHomedir /Users/ftp/default/cd1/
#SQLDefaultHomedir homedir
SQLLog PASS updatelogin
SQLNamedQuery updatelogin UPDATE "count=count+1 WHERE username='%u'" ftpusers

ExtendedLog /var/log/proftpd.log
DefaultRoot ~
# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite off

Mac Os X 10.4 has no support for inetd, remember that the server type should be standalone


To start the daemon launch ./proftpd &


and try to connect