Joachim, If I remember correctly for our galaxy proftpd setup on ubuntu 10.10. Be sure to compile proftpd with the required additional SQL modules. Then figure out the user and group ids of galaxy user that can access the DB (mysql in our case). $ id galaxy (or whatever user you use) Make sure these ids are in the SELECT statement of the proftpd config file Below our section: # Define a custom query for lookup that returns a passwd-like entry. UID and GID should match your Galaxy user. SQLUserInfo custom:/LookupGalaxyUser SQLNamedQuery LookupGalaxyUser SELECT "email,password,'1001','1002','/mnt/galaxy_data/galaxy_database/ftp/%U','/bin/bash' FROM galaxy_user WHERE email='%U'" In our case de uid and gid were 1001 and 1002 Hope it helps, Alex -----Oorspronkelijk bericht----- Van: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu] Namens Joachim Jacob Verzonden: vrijdag 13 juli 2012 15:19 Aan: galaxy-dev@lists.bx.psu.edu Onderwerp: [galaxy-dev] Setting up proftpd problem: ftp login failure Dear Galaxy devs, I am setting up an ftp server with authentication to the Galaxy user tables, but the password is not recognized as being correct. joachim@joachim-laptop:~$ ftp 192.168.10.23 Connected to 192.168.10.23. 220 Welcome to BITS Galaxy FTP server. Name (192.168.10.23:joachim): joachim.jacob@vib.be 331 Password required for joachim.jacob@vib.be Password: 530 Login incorrect. Login failed. 421 Service not available, remote server has closed connection ftp> My setup: - Centos 6.2 - proftpd 1.3.3 - postgres (PostgreSQL) 8.4.11 I have configured proftpd.conf (see below), and also /var/lib/pgsql/data/pg_hba.conf. *** proftpd.conf *** # This is the ProFTPD configuration file # Server Config - config used for anything outside a <VirtualHost> or <Global> context ServerName "BITS Galaxy FTP" ServerIdent on "Welcome to BITS Galaxy FTP server." ServerType standalone ServerAdmin root@localhost DefaultServer on Port 21 Umask 077 SyslogFacility DAEMON SyslogLevel debug DefaultRoot ~ !adm CreateHome on dirmode 700 PassivePorts 39000 40000 MaxInstances 30 User nobody Group nobody # Don't do reverse DNS lookups (hangs on DNS problems) UseReverseDNS off MaxInstances 20 # Define the log formats LogFormat default "%h %l %u %t \"%r\" %s %b" LogFormat auth "%v [%P] %h %t \"%r\" %s" # General database support LoadModule mod_sql.c # Support for base-64 or hex encoded MD5 and SHA1 passwords from SQL tables LoadModule mod_sql_passwd.c # Postgresql support (requires proftpd-postgresql package) LoadModule mod_sql_postgres.c <Global> # Allow users to overwrite files and change permissions AllowOverwrite yes AllowStoreRestart on # Bar use of SITE CHMOD <Limit SITE_CHMOD> DenyAll </Limit> # Bar use of RETR (download) since this is not a public file drop <Limit RETR> DenyAll </Limit> SQLLogFile /var/log/proftpd/proftpd.log # Set up mod_sql_password - Galaxy passwords are stored as hex-encoded SHA1 SQLPasswordEngine on SQLPasswordEncoding hex RequireValidShell off # Set up mod_sql to authenticate against the Galaxy database SQLEngine on SQLBackend postgres SQLConnectInfo galaxydb@127.0.0.1 ftpuser ftppassword SQLAuthTypes SHA1 SQLAuthenticate users # An empty directory in case chroot fails SQLDefaultHomedir /mnt/galaxytemp/ftptmp SQLMinID 98 # Define a custom query for lookup that returns a passwd-like entry. UID and GID should match your Galaxy user. SQLUserInfo custom:/LookupGalaxyUser SQLNamedQuery LookupGalaxyUser SELECT "email,password,'600','601','/mnt/galaxydb/ftp/%U','/bin/bash' FROM galaxy_user WHERE email='%U'" </Global> Now upon trying to connect with ftp to the server, it fails prompting that the login is incorrect (tried also from outside our network, also using FileZilla): joachim@joachim-laptop:~$ ftp 192.168.10.23 Connected to 192.168.10.23. 220 Welcome to BITS Galaxy FTP server. Name (192.168.10.23:joachim): joachim.jacob@vib.be 331 Password required for joachim.jacob@vib.be Password: 530 Login incorrect. Login failed. 421 Service not available, remote server has closed connection ftp> The lengthy log of proftpd has this logged: Jul 13 14:30:56 mod_sql/4.2.5[23479]: defaulting to 'postgres' backend Jul 13 14:30:56 mod_sql/4.2.5[23479]: backend module 'mod_sql_postgres/4.0.4' Jul 13 14:30:56 mod_sql/4.2.5[23479]: backend api 'mod_sql_api_v1' Jul 13 14:30:56 mod_sql/4.2.5[23479]: >>> sql_sess_init Jul 13 14:30:56 mod_sql/4.2.5[23479]: entering postgres cmd_defineconnection Jul 13 14:30:56 mod_sql/4.2.5[23479]: name: 'default' Jul 13 14:30:56 mod_sql/4.2.5[23479]: user: 'galaxyftp' Jul 13 14:30:56 mod_sql/4.2.5[23479]: host: '127.0.0.1' Jul 13 14:30:56 mod_sql/4.2.5[23479]: db: 'galaxydb' Jul 13 14:30:56 mod_sql/4.2.5[23479]: port: '5432' Jul 13 14:30:56 mod_sql/4.2.5[23479]: ttl: '0' Jul 13 14:30:56 mod_sql/4.2.5[23479]: exiting postgres cmd_defineconnection Jul 13 14:30:56 mod_sql/4.2.5[23479]: mod_sql engine : on Jul 13 14:30:56 mod_sql/4.2.5[23479]: negative_cache : off Jul 13 14:30:56 mod_sql/4.2.5[23479]: authenticate : users Jul 13 14:30:56 mod_sql/4.2.5[23479]: usertable : users Jul 13 14:30:56 mod_sql/4.2.5[23479]: userid field : userid Jul 13 14:30:56 mod_sql/4.2.5[23479]: password field : passwd Jul 13 14:30:56 mod_sql/4.2.5[23479]: UID field : uid Jul 13 14:30:56 mod_sql/4.2.5[23479]: GID field : gid Jul 13 14:30:56 mod_sql/4.2.5[23479]: homedir field : homedir Jul 13 14:30:56 mod_sql/4.2.5[23479]: homedir(default) : '/mnt/galaxytemp/ftptmp' Jul 13 14:30:56 mod_sql/4.2.5[23479]: shell field : shell Jul 13 14:30:56 mod_sql/4.2.5[23479]: SQLMinUserUID : 98 Jul 13 14:30:56 mod_sql/4.2.5[23479]: SQLMinUserGID : 98 Jul 13 14:30:56 mod_sql/4.2.5[23479]: <<< sql_sess_init Jul 13 14:31:14 mod_sql/4.2.5[23479]: >>> sql_pre_pass Jul 13 14:31:14 mod_sql/4.2.5[23479]: <<< sql_pre_pass Jul 13 14:31:14 mod_sql/4.2.5[23479]: >>> cmd_getpwnam Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_escapestring Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_open Jul 13 14:31:14 mod_sql/4.2.5[23479]: Postgres server version: 8.4.11 Jul 13 14:31:14 mod_sql/4.2.5[23479]: Postgres connection character set now 'UTF8' (from 'UTF-8 ') Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' opened Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' count is now 2 Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_open Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' count is now 1 Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_escapestring Jul 13 14:31:14 mod_sql/4.2.5[23479]: cache miss for user 'joachim.jacob@vib.be' Jul 13 14:31:14 mod_sql/4.2.5[23479]: >>> sql_lookup Jul 13 14:31:14 mod_sql/4.2.5[23479]: >>> process_named_query 'LookupGalaxyUser' Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_escapestring Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_open Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' count is now 2 Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_open Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' count is now 1 Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_escapestring Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_select Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_open Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' count is now 2 Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_open Jul 13 14:31:14 mod_sql/4.2.5[23479]: query "SELECT email,password,'600','601','/mnt/galaxydb/ftp/joachim.jacob@vib.be','/bin/bash' FROM galaxy_user WHERE email='joachim.jacob@vib.be'" Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' count is now 1 Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_select Jul 13 14:31:14 mod_sql/4.2.5[23479]: <<< process_named_query 'LookupGalaxyUser' Jul 13 14:31:14 mod_sql/4.2.5[23479]: <<< sql_lookup Jul 13 14:31:14 mod_sql/4.2.5[23479]: cache miss for user 'joachim.jacob@vib.be' Jul 13 14:31:14 mod_sql/4.2.5[23479]: user 'joachim.jacob@vib.be' cached Jul 13 14:31:14 mod_sql/4.2.5[23479]: + pwd.pw_name : joachim.jacob@vib.be Jul 13 14:31:14 mod_sql/4.2.5[23479]: + pwd.pw_uid : 600 Jul 13 14:31:14 mod_sql/4.2.5[23479]: + pwd.pw_gid : 601 Jul 13 14:31:14 mod_sql/4.2.5[23479]: + pwd.pw_dir : /mnt/galaxydb/ftp/joachim.jacob@vib.be Jul 13 14:31:14 mod_sql/4.2.5[23479]: + pwd.pw_shell : /bin/bash Jul 13 14:31:14 mod_sql/4.2.5[23479]: <<< cmd_getpwnam Jul 13 14:31:14 mod_sql/4.2.5[23479]: >>> cmd_auth Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_escapestring Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_open Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' count is now 2 Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_open Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' count is now 1 Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_escapestring Jul 13 14:31:14 mod_sql/4.2.5[23479]: cache hit for user 'joachim.jacob@vib.be' Jul 13 14:31:14 mod_sql/4.2.5[23479]: >>> cmd_check Jul 13 14:31:14 mod_sql/4.2.5[23479]: checking password using SQLAuthType 'sha1' Jul 13 14:31:14 mod_sql/4.2.5[23479]: 'sha1' SQLAuthType handler reports success Jul 13 14:31:14 mod_sql/4.2.5[23479]: cache hit for user 'joachim.jacob@vib.be' Jul 13 14:31:14 mod_sql/4.2.5[23479]: <<< cmd_check Jul 13 14:31:14 mod_sql/4.2.5[23479]: <<< cmd_auth Jul 13 14:31:14 mod_sql/4.2.5[23479]: >>> cmd_getpwnam Jul 13 14:31:14 mod_sql/4.2.5[23479]: cache hit for user 'joachim.jacob@vib.be' Jul 13 14:31:14 mod_sql/4.2.5[23479]: <<< cmd_getpwnam Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_exit Jul 13 14:31:14 mod_sql/4.2.5[23479]: entering postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' closed Jul 13 14:31:14 mod_sql/4.2.5[23479]: connection 'default' count is now 0 Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_close Jul 13 14:31:14 mod_sql/4.2.5[23479]: exiting postgres cmd_exit So a lot of exiting here. Can anybody help me further with this? Have a pleasant weekend! Joachim -- Joachim Jacob, PhD Rijvisschestraat 120, 9052 Zwijnaarde Tel: +32 9 244.66.34 Bioinformatics Training and Services (BITS) http://www.bits.vib.be @bitsatvib ___________________________________________________________ Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/