Установлены ProFTPd 1.3.3a и Postgres 9.1.7.
sql.conf
Код: Выделить всё
<IfModule mod_sql.c>
SQLBackend postgres
SQLEngine on
SQLAuthenticate on
SQLAuthTypes OpenSSL
SQLConnectInfo proftpd@127.0.0.1 proftpd proftpd
SQLUserInfo users userid passwd uid gid homedir shell
SQLGroupInfo groups groupname gid members
SQLLogFile /var/log/proftpd/sql.log
SQLDefaultHomedir /home/ftp/public
SQLDefaultUID 999
SQLDefaultGID 999
</IfModule>
/var/log/proftpd/sql.log
Код:
Feb 07 09:30:02 mod_sql/4.2.5[30435]: entering postgres cmd_exit
Feb 07 09:30:02 mod_sql/4.2.5[30435]: entering postgres cmd_close
Feb 07 09:30:02 mod_sql/4.2.5[30435]: connection 'default' closed
Feb 07 09:30:02 mod_sql/4.2.5[30435]: connection 'default' count is now 0
Feb 07 09:30:02 mod_sql/4.2.5[30435]: exiting postgres cmd_close
Feb 07 09:30:02 mod_sql/4.2.5[30435]: exiting postgres cmd_exit
Feb 07 09:30:07 mod_sql/4.2.5[30440]: defaulting to 'postgres' backend
Feb 07 09:30:07 mod_sql/4.2.5[30440]: backend module 'mod_sql_postgres/4.0.4'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: backend api 'mod_sql_api_v1'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: >>> sql_sess_init
Feb 07 09:30:07 mod_sql/4.2.5[30440]: entering postgres cmd_defineconnection
Feb 07 09:30:07 mod_sql/4.2.5[30440]: name: 'default'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: user: 'proftpd'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: host: '127.0.0.1'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: db: 'proftpd'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: port: '5432'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: ttl: '0'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: exiting postgres cmd_defineconnection
Feb 07 09:30:07 mod_sql/4.2.5[30440]: mod_sql engine : on
Feb 07 09:30:07 mod_sql/4.2.5[30440]: negative_cache : off
Feb 07 09:30:07 mod_sql/4.2.5[30440]: authenticate : users groups userset groupset
Feb 07 09:30:07 mod_sql/4.2.5[30440]: usertable : users
Feb 07 09:30:07 mod_sql/4.2.5[30440]: userid field : userid
Feb 07 09:30:07 mod_sql/4.2.5[30440]: password field : passwd
Feb 07 09:30:07 mod_sql/4.2.5[30440]: UID field : uid
Feb 07 09:30:07 mod_sql/4.2.5[30440]: GID field : gid
Feb 07 09:30:07 mod_sql/4.2.5[30440]: homedir field : homedir
Feb 07 09:30:07 mod_sql/4.2.5[30440]: homedir(default) : '/home/ftp/public'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: shell field : shell
Feb 07 09:30:07 mod_sql/4.2.5[30440]: group table : groups
Feb 07 09:30:07 mod_sql/4.2.5[30440]: groupname field : groupname
Feb 07 09:30:07 mod_sql/4.2.5[30440]: grp GID field : gid
Feb 07 09:30:07 mod_sql/4.2.5[30440]: grp members field : members
Feb 07 09:30:07 mod_sql/4.2.5[30440]: SQLMinUserUID : 999
Feb 07 09:30:07 mod_sql/4.2.5[30440]: SQLMinUserGID : 999
Feb 07 09:30:07 mod_sql/4.2.5[30440]: SQLDefaultUID : 999
Feb 07 09:30:07 mod_sql/4.2.5[30440]: SQLDefaultGID : 999
Feb 07 09:30:07 mod_sql/4.2.5[30440]: <<< sql_sess_init
Feb 07 09:30:07 mod_sql/4.2.5[30440]: >>> cmd_endpwent
Feb 07 09:30:07 mod_sql/4.2.5[30440]: <<< cmd_endpwent
Feb 07 09:30:07 mod_sql/4.2.5[30440]: >>> cmd_endgrent
Feb 07 09:30:07 mod_sql/4.2.5[30440]: <<< cmd_endgrent
Feb 07 09:30:07 mod_sql/4.2.5[30440]: >>> sql_pre_pass
Feb 07 09:30:07 mod_sql/4.2.5[30440]: <<< sql_pre_pass
Feb 07 09:30:07 mod_sql/4.2.5[30440]: >>> cmd_endpwent
Feb 07 09:30:07 mod_sql/4.2.5[30440]: <<< cmd_endpwent
Feb 07 09:30:07 mod_sql/4.2.5[30440]: >>> cmd_endgrent
Feb 07 09:30:07 mod_sql/4.2.5[30440]: <<< cmd_endgrent
Feb 07 09:30:07 mod_sql/4.2.5[30440]: >>> cmd_getpwnam
Feb 07 09:30:07 mod_sql/4.2.5[30440]: entering postgres cmd_escapestring
Feb 07 09:30:07 mod_sql/4.2.5[30440]: entering postgres cmd_open
Feb 07 09:30:07 mod_sql/4.2.5[30440]: Postgres server version: 9.1.7
Feb 07 09:30:07 mod_sql/4.2.5[30440]: Postgres connection character set now 'UTF8' (from 'UTF-8')
Feb 07 09:30:07 mod_sql/4.2.5[30440]: connection 'default' opened
Feb 07 09:30:07 mod_sql/4.2.5[30440]: connection 'default' count is now 2
Feb 07 09:30:07 mod_sql/4.2.5[30440]: exiting postgres cmd_open
Feb 07 09:30:07 mod_sql/4.2.5[30440]: entering postgres cmd_close
Feb 07 09:30:07 mod_sql/4.2.5[30440]: connection 'default' count is now 1
Feb 07 09:30:07 mod_sql/4.2.5[30440]: exiting postgres cmd_close
Feb 07 09:30:07 mod_sql/4.2.5[30440]: exiting postgres cmd_escapestring
Feb 07 09:30:07 mod_sql/4.2.5[30440]: cache miss for user 'user'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: entering postgres cmd_select
Feb 07 09:30:07 mod_sql/4.2.5[30440]: entering postgres cmd_open
Feb 07 09:30:07 mod_sql/4.2.5[30440]: connection 'default' count is now 2
Feb 07 09:30:07 mod_sql/4.2.5[30440]: exiting postgres cmd_open
Feb 07 09:30:07 mod_sql/4.2.5[30440]: query "SELECT userid, passwd, uid, gid, homedir, shell FROM users WHERE (userid='user') LIMIT 1"
Feb 07 09:30:07 mod_sql/4.2.5[30440]: entering postgres cmd_close
Feb 07 09:30:07 mod_sql/4.2.5[30440]: connection 'default' count is now 1
Feb 07 09:30:07 mod_sql/4.2.5[30440]: exiting postgres cmd_close
Feb 07 09:30:07 mod_sql/4.2.5[30440]: exiting postgres cmd_select
Feb 07 09:30:07 mod_sql/4.2.5[30440]: unrecoverable backend error
Feb 07 09:30:07 mod_sql/4.2.5[30440]: error: 'mod_sql_postgres/4.0.4'
Feb 07 09:30:07 mod_sql/4.2.5[30440]: message: 'ERROR: permission denied for relation users
Feb 07 09:30:07 mod_sql/4.2.5[30440]: entering postgres cmd_exit
Feb 07 09:30:07 mod_sql/4.2.5[30440]: entering postgres cmd_close
Feb 07 09:30:07 mod_sql/4.2.5[30440]: connection 'default' closed
Feb 07 09:30:07 mod_sql/4.2.5[30440]: connection 'default' count is now 0
Feb 07 09:30:07 mod_sql/4.2.5[30440]: exiting postgres cmd_close
Feb 07 09:30:07 mod_sql/4.2.5[30440]: exiting postgres cmd_exit
Я не могу понять причины unrecoverable backend error, как следствие, я думаю, пользователь не авторизуется.
Сам SQL-запрос при выполнении в консоли базы возвращает одну строку:
Код: Выделить всё
"user";"{md5}5c444173e681a3c5bb65182aad05e96a";;;"~";""
Пароль формировал так - echo 'test' | md5sum, так же пробовал метод описаный http://www.proftpd.org/docs/howto/SQL.html, не думаю, что проблема в пароле.
Можете подсказать в чём ошибка?
Спасибо.