pure-ftpd user manager

This is a description of my implementation of a pure-ftpd server user manager. The script component (php) really is very simple, for it to do anything useful, pure-ftpd has to be confgured in a specific fashion, described herein. I have used this configuration to administer a pure-ftpd server for a couple of years now. My usage is somewhat specialized, but this information might be useful to other pure-ftpd users, and the script provided here is free for use.

About pure-ftpd

pure-ftpd is an awesome little ftp server that runs on pretty much any flavour of *nix, including OSX, and it does Windows too. I run mine on Fedora Core 2 (I don't need to upgrade 'cause everything works just fine the way it is). pure-ftpd is well documented, has good security characteristics, relatively easy configurability, and it's ability to use an mysql database for authentication is the key to my implementation. Learn more and get it here.

About my implementation

I use pureftpd in a prepress environment. Clients upload files to us, we pull the files off the server, and do whatever we need to do with them. Often we return back the client processed files, usually PDF format, back to their ftp directory. This setup currently manages about 300 users. There are things my server is not :

Things I needed in a user manager:

Demo

Before you go any further, you might like to see the interface. Note, however, that the interface is not important - it simply inserts, updates, and displays a simple mysql table. It's pureftp's hooks to the database that do the magic. You can add or modify information here, but this demo isn't hooked up to a pureftpd server, so this doesn't create live ftp accounts, you'll need to read on for that. If you're handy with php, you can modify this interface as you wish:

Click the Show All button to see anything interesting. The available space on the server is reported at top right. Users will be displayed sorted alphabetically by username. Display is currently 12 rows per page. Search provides a rudimentary search function. Clicking on a user provides more details (editable) about them including files currently in their directory. I'll tell you up front there are a few quirks to this interface, but it works well enough and some day I'll tidy up the little things.

There are generally 3 steps to get this setup successfully:

Oh yeah, read some read-me's along the way. So if I haven't lost you yet, proceed to page 2 for more details....

Page 2....