Comments on Virtual Hosting With PureFTPd And MySQL (Incl. Quota And Bandwidth Management) On Ubuntu 10.10 (Maverick Meerkat)

This document describes how to install a PureFTPd server that uses virtual users from a MySQL database instead of real system users. This is much more performant and allows to have thousands of ftp users on a single machine. In addition to that I will show the use of quota and upload/download bandwidth limits with this setup. Passwords will be stored encrypted as MD5 strings in the database.

2 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Anthony

In the mysql db and table... are 3 blocks -first "creating" DB block... the second block <code>USE pureftpd; </code>...bellows to the end of who, DB or the 3 block ->table of database pureftpd that we created in first block ?

Why my concern, cuz I do entry all data manually in phpmydmin, and there is Alert msg saying that <cite>The indexes PRIMARY and User seem to be equal and one of them could possibly be removed</cite>... thanks for any suggestion and keep-up fellows :p

By: Carlos

I think the text for step 5-Configure PureFTPd has some errors that prevent PureFTPd from starting. I tried starting my server and I got an error message saying that mysql.conf was invalid. I deleted the text and I thought I would just paste again... but nooooo... Putty SSH would not let me paste in Ubuntu... anyway... I ended up manually inputting the text back in the file, which is when I found the errors:

  1. Make sure that ALL the "Y" in the MYSQL[...] variables are capitalized. (I don't know if this is actually an issue, but I noticed that all the other ones before MYSQLGetBandwidthUL had the "y" in uppercase)
  2. Starting from MYSQLGetGID and down, make sure you add a space between User="\L" and the word "AND"; i.e.

MYSQLGetGID SELECT Gid WHERE User="\L"-AND-status="1" AND (ipaccess="*" OR ipaccess LIKE "\R")

 Remove the dashes, they are just there to indicate the error. Hope this helps someone!