We want to set up a FTP Daemon on our Ubuntu 10.04 server that can use a simple (probably custom) built web interface for a FTP server using MySQL for authentication.
It'll be public facing but only intended for use by a few customers or clients.
I know vsftpd, ProFTPd, and Pure-FTPd but I'm not sure which is best for this application.
Main features we would like:
- Very good MySQL authentication integration
- Able to specify a list folders/files (folder level is sufficient) each user has access to through MySQL
For 2, we're looking for something as simple as, basically, userA gets access to folderA and userB gets access to folderB. If userC could have access to folderA, folderB, and folderC, that would be great.
Anything else would just be sprinkles on top.
I would suggest you use vsftpd for two reasons:
For authentication, vsftpd uses PAM. Excerpt from the FAQ:
How to configure pam_mysql authentication is probably best asked & explained in a separate question though.
About permissions: vsftpd can chroot users into their "home" (which is configurable with PAM too). You should be able to use hardlinks (or maybe also symlinks?) to link all directories they should have access to inside their home directory.
i am not sure if this would work out well but considering you will be giving your users virtual homes, you could try to for example creating the directory groupC inside groupC you would create the home for A and B and the groupC folder would be the user C home which would allow him access...
Looking at this tutorial for ubuntu, it seems quiet possible to achieve what you want with proftpd: http://www.howtoforge.com/virtual-hosting-with-proftpd-and-mysql-ubuntu-8.04
Since you can set users to the same group it might allow you to use the files aswell, i am not sure as i never did it but worths a try.
GL ;)
i'm happy user of pureftpd, unfortunately it solves only problem #1 using mysql. for 2nd one you can try to be creative with group permissions or hard/symlinks.