I have a problem with my pure-ftpd-mysql setup on my Debian server. The database and it's content is migrated from my previous Archlinux server. I've gone through everything I could think of but I haven't found the problem.

I'm a bit surprised there aren't more information from pure-ftp what the problem is. Maybe there's a way to turn better logging except for AltLog and VerboseLog?

Hopefully someone with some more experience can point out the problem for me or at least point me in the right direction :)

Thanks in advance!

EDIT:

As I haven't found an answer to the latest the discovery (written as a comment) I've reported this as bug to the package maintainer. If you want to view the status of the bug, here's the url: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=606418


Here's the specs:

Debian squeeze/sid Linux 2.6.26-2-686 pure-ftpd-mysql 1.0.28-2

Syslog error:

Dec  8 16:58:41 johnnyserver pure-ftpd-wrapper[5215]: connect from **.***.***.** (**.***.***.**)
Dec  8 16:58:41 johnnyserver pure-ftpd: (**********) [INFO] New connection from **********
Dec  8 16:58:41 johnnyserver pure-ftpd: (**********) [DEBUG] Command [user] [johndoe]
Dec  8 16:58:41 johnnyserver pure-ftpd: (**********) [DEBUG] Command [pass] [<*>]
Dec  8 16:58:41 johnnyserver pure-ftpd: (**********) [WARNING] Authentication failed for user [johndoe]

And here is the log from mysql:

101208 16:58:41 pureftp@localhost on pureftp
610 Query       SELECT password FROM users WHERE name="johndoe"
610 Query       SELECT uid FROM users WHERE name="johndoe"
610 Query       SELECT gid FROM users WHERE name="johndoe"
610 Query       SELECT dir FROM users WHERE name="johndoe"
610 Quit   

And here's the sql code for the pureftp table:

CREATE TABLE IF NOT EXISTS `users` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `uid` int(11) NOT NULL,
  `gid` int(11) NOT NULL,
  `dir` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

And here's the a concat of all the config files for pure-ftpd-mysql:

NoAnonymous     yes
PAMAuthentication   no
UnixAuthentication  no
MinUID      33
PureDB      /etc/pure-ftpd/pureftpd.pdb
MYSQLSocket         /var/run/mysqld/mysqld.sock
MYSQLUser           pureftp
MYSQLPassword       icanhazpassword
MYSQLDatabase       pureftp
MYSQLCrypt      password
MYSQLGetUID         SELECT uid FROM users WHERE name="\L"
MYSQLGetGID         SELECT gid FROM users WHERE name="\L"
MYSQLGetDir         SELECT dir FROM users WHERE name="\L"
link|improve this question
I'm not familiar with pure-ftp, but I suspect your problem may be with the passwords imported from your previous system. One way to test my theory is to create a brand new user in pure-ftp, and then see if you can connect and authenticate as that user. – Steven Monday Dec 8 '10 at 16:54
Thanks for the comment, Steven. I tried doing that by creating a login for my www root. INSERT INTO users (id, name, password, uid, gid, dir) VALUES (NULL, 'www-data', PASSWORD('123456'), 33, 33, '/var/www'); And then tried connecting but unfortunately I got the same result. :/ – rzetterberg Dec 8 '10 at 22:35
I tried removing pure-ftpd alltogether by doing a "apt-get --purge remove pure-ftpd-common pure-ftpd-mysql" and then reinstalling it and setting it up. As soon as I install the package a instance of pure-ftp is started. Even if I do "/etc/init.d/pure-ftpd-mysql stop" a instance is still running. Very strange... – rzetterberg Dec 8 '10 at 23:29
Did you change the default minimum uid from 1000 to allow someone with uid 33 to log in? – DerfK Dec 9 '10 at 4:12
DerfK: Yes, as you can see in my config the MinUID is 33. – rzetterberg Jan 8 '11 at 13:35
show 2 more comments
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.