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@sql.example.com 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