Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set up an ftp server for the first time (under Debian Squeeze) and after searching through Google, I decided to use proftp.

NOTE: I have a PostgreSQL server running in the same machine where the ftp will be.

I now have a question about virtual users. Looking at some howto's, I think that the best way to set up the ftp is to use virtual users, but all those howto's I found create a new database to store the login/password information, whereas I want proftpd to allow connection only to those users who have rights in PostgreSQL. I mean, only to those users that are listed when doing this:

# su - postgres
$ psql
$ \du

I have modified the sql.conf file accordingly to my needs, but I'm not sure what to do with the last sections:

<IfModule mod_sql.c>
SQLBackend  postgres
SQLEngine on
SQLAuthenticate on
SQLAuthTypes Backend Crypt

#SQLConnectInfo proftpd_user proftpd_password

# Describes both users/groups tables
#SQLUserInfo users userid passwd uid gid homedir shell
#SQLGroupInfo groups groupname gid members

And is the groups table required?

I'm asking before doing something funny with the server and mess it up.

EDIT 1: This is what \du prints. The column tags may be wrong as I'm translating directly from Spanish and I don't know how the chart is displayed in English. So sorry about that.

So, the users I would like to be able to connect to the ftp are: *chair_1*, *chair_2*, *wall_1* and myuser.

                  Role List
 Role name     |      Attributes     | Member of 
 chair         | Can't connect       | {}
 chair_1       |                     | {chair}
 chair_2       |                     | {chair}
 wall          | Can't connect       | {}
 wall_1        |                     | {wall}
 myuser        | Superuser           | {}
               : Create role             
               : Create BD              
 postgres      | Superuser           | {}
               : Create role             
               : Create BD   
share|improve this question
You mean checking permissions on postgresql in addition to providing your own users table/view or instead of it? In the latter case how do you get the fields like uid,gid,homedir...? – Daniel Vérité Jan 16 '14 at 18:57
@DanielVérité What I want is something like: 1-I connect to the ftp with my login/pass. 2-If my login is listed in the Role name column of \du output, let me in. If not, refuse the connection. I think this would be the instead of it case. In that case, is it possible to have all the Role names have the same gid and homedir? – Adri C.S. Jan 17 '14 at 8:05

Your Answer


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

Browse other questions tagged or ask your own question.