HowtoForge does Ubuntu – or you want to set up an ftp server, you need advanced functionality and you don't know where to turn? Try proftpd.
Setting up proftpd with a postgresql backend
This tutorial is very niche, I'm going to cover only proftpd, and only insomuch as to get it operational with Postgres. A basic understanding of proftpd, and Postgres is assumed. This tutorial will get you up and running proftpd pretty fast, and having it utilize a database, if that database has triggers, the possibilities of this configuration are almost endless.