Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:

  1. Very good MySQL authentication integration
  2. 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.

share|improve this question
    
Well, any of the daemons you list can use the database to authenticate users, but none of them seem to have a way to store permission info about particular files in the database. I don't know off-hand of any FTP daemons that meet your criteria. –  Walter Mundt Jun 17 '10 at 3:50

3 Answers 3

I would suggest you use vsftpd for two reasons:

  • it's the recommended FTP server in Ubuntu (& Red Hat)
  • it has a better security track record than the other two

For authentication, vsftpd uses PAM. Excerpt from the FAQ:

Q) Help! Will vsftpd authenticate against an LDAP server? What about a
MySQL server?
A) Yes. vsftpd uses PAM for authentication, so you need to configure PAM
to use pam_ldap or pam_mysql modules. This may involve installing the PAM
modules and then editing the PAM config file (perhaps /etc/pam.d/vsftpd).

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.

share|improve this answer

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 ;)

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.