LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Always 530 error with Proftpd (https://www.linuxquestions.org/questions/linux-software-2/always-530-error-with-proftpd-561828/)

Hum4ngus 06-14-2007 12:32 PM

Always 530 error with Proftpd
 
Hi all!

i've got a problem i can't seem to fix myself.

here goes:

Distro: Gentoo

Recently i was trying to find out why connecting to my ftp server was so slow, i found out that by putting "Identlookup off" in the proftpd.conf i would speed up connecting.
so i did, suddenly i couldn't login anymore. on any of my users. they would all get the 530 error ([R] 530 Login incorrect.)

before i tried fixing this problem using forums etc, i wanted to update my whole system (because i hadn't in a very long time).
So i followed these two guides:

http://www.gentoo.org/doc/en/change-chost.xml
and
http://www.gentoo.org/doc/en/gcc-upgrading.xml

i did the first gcc as said in the "change chost" guide.
i completed these 2 guides without any problems, but my proftpd problem didn't go away.

i searched a lot of other threads regarding this problem, the most obvious solution was checking if the users had a valid shell or not. i did that and i "think" this is not the real problem.

I'll post all sorts of logs and information i can get my hands on.

/var/log/messages

Quote:

Jun 14 16:23:49 Humster proftpd[29658]: humster.nl (::ffff:192.168.1.77[::ffff:192.168.1.77]) - error setting IPV6_V6ONLY: Protocol not availab$
Jun 14 16:23:49 Humster proftpd[29658]: humster.nl (::ffff:192.168.1.77[::ffff:192.168.1.77]) - FTP session opened.
Jun 14 16:23:49 Humster proftpd[29658]: humster.nl (::ffff:192.168.1.77[::ffff:192.168.1.77]) - USER www (Login failed): Incorrect password.
Jun 14 16:23:49 Humster proftpd[29658]: humster.nl (::ffff:192.168.1.77[::ffff:192.168.1.77]) - FTP session closed.
/var/log/proftpd.system.log

Quote:

Jun 14 19:35:16 Humster proftpd[32156] humster.nl: ProFTPD 1.3.1rc2 (devel) (built Thu Jun 14 19:29:01 CEST 2007) standalone mode STARTUP
Jun 14 19:37:05 Humster proftpd[32156] humster.nl: ProFTPD killed (signal 15)
Jun 14 19:37:05 Humster proftpd[32156] humster.nl: ProFTPD 1.3.1rc2 standalone mode SHUTDOWN
Jun 14 19:40:02 Humster proftpd[28463] humster.nl: error setting IPV6_V6ONLY: Protocol not available
Jun 14 19:40:02 Humster proftpd[28463] humster.nl: ProFTPD 1.3.1rc2 (devel) (built Thu Jun 14 19:29:01 CEST 2007) standalone mode STARTUP
Jun 14 19:40:06 Humster proftpd[28535] humster.nl (::ffff:192.168.1.77[::ffff:192.168.1.77]): error setting IPV6_V6ONLY: Protocol not available
Jun 14 19:40:06 Humster proftpd[28535] humster.nl (::ffff:192.168.1.77[::ffff:192.168.1.77]): FTP session opened.
Jun 14 19:40:06 Humster proftpd[28535] humster.nl (::ffff:192.168.1.77[::ffff:192.168.1.77]): USER www (Login failed): Incorrect password.
Jun 14 19:40:06 Humster proftpd[28535] humster.nl (::ffff:192.168.1.77[::ffff:192.168.1.77]): FTP session closed.
/etc/proftpd/proftpd.conf

Quote:

ServerName "Humster FTP server"
ServerType standalone
DefaultServer on
RootLogin on
RequireValidShell off
AuthPAM off
AuthPAMConfig ftp
Port 21
Umask 022
MaxInstances 30

SystemLog /var/log/proftpd.system.log

User ftp
Group ftp

<Directory />
AllowOverwrite on
</Directory>
/etc/shells

Quote:

# /etc/shells: valid login shells
/bin/bash
/bin/csh
/bin/esh
/bin/fish
/bin/ksh
/bin/sash
/bin/sh
/bin/tcsh
/bin/zsh

/bin/false
# proftpd -t
Checking syntax of configuration file
Syntax check complete.

# proftpd -n -d 10
- mod_tls/2.1.2: using OpenSSL 0.9.8e 23 Feb 2007
- retrieved UID 21 for user 'ftp'
- retrieved GID 21 for group 'ftp'
- <Directory />: deferring resolution of path
humster.nl -
humster.nl - Config for Humster FTP server:
humster.nl - /
humster.nl - AllowOverwrite
humster.nl - RootLogin
humster.nl - RequireValidShell
humster.nl - Umask
humster.nl - DefaultServer
humster.nl - RootLogin
humster.nl - RequireValidShell
humster.nl - AuthPAM
humster.nl - AuthPAMConfig
humster.nl - Umask
humster.nl - UserID
humster.nl - UserName
humster.nl - GroupID
humster.nl - GroupName
humster.nl - ROOT PRIVS at mod_delay.c:299
humster.nl - RELINQUISH PRIVS at mod_delay.c:301
humster.nl - ROOT PRIVS at mod_ctrls.c:1618
humster.nl - RELINQUISH PRIVS at mod_ctrls.c:1620
humster.nl - mod_lang/0.8: binding to text domain 'proftpd' using locale path '/usr/share/locale'
humster.nl - retrieved group ID: 21
humster.nl - setting group ID: 21
humster.nl - SETUP PRIVS at main.c:2824
humster.nl - ROOT PRIVS at main.c:1895
humster.nl - RELINQUISH PRIVS at main.c:1902
humster.nl - ROOT PRIVS at main.c:2228
humster.nl - deleting existing scoreboard '/var/run/proftpd/proftpd.scoreboard'
humster.nl - opening scoreboard '/var/run/proftpd/proftpd.scoreboard'
humster.nl - RELINQUISH PRIVS at main.c:2254
humster.nl - error setting IPV6_V6ONLY: Protocol not available
humster.nl - ROOT PRIVS at inet.c:329
humster.nl - RELINQUISH PRIVS at inet.c:373
humster.nl - Failed binding to ::, port 21: Address already in use
humster.nl - Check the ServerType directive to ensure you are configured correctly.
humster.nl - ROOT PRIVS at mod_delay.c:1084
humster.nl - RELINQUISH PRIVS at mod_delay.c:1086

# grep ftp /etc/passwd
ftp:x:21:21:added by portage for ftpbase:/home/ftp:/sbin/nologin
proftpd:x:101:1001:added by portage for proftpd:/dev/null:/sbin/nologin

# grep ftp /etc/group
ftp:x:21:
proftpd:x:1001:

# grep www /etc/passwd
www:x:1000:1000:/var/www/localhost/humster.nl/:/var/www/localhost/humster.nl:/bin/false

# grep www /etc/group
www:x:1000:

# ps -e | grep ftp
28463 ? 00:00:00 proftpd

# ls /var/run/*.pid | grep ftp
/var/run/proftpd.pid

When trying to connect:

[R] Connecting to 192.168.1.72 -> IP=192.168.1.72 PORT=21
[R] Connected to 192.168.1.72
[R] 220 ProFTPD 1.3.1rc2 Server (Humster FTP server) [::ffff:192.168.1.72]
[R] USER www
[R] 331 Password required for www
[R] PASS (hidden)
[R] 530 Login incorrect.
[R] Connection failed


I hope you guys could help me with this problem.

Thanks!

imagineers7 06-15-2007 11:48 PM

Hi Hum4ngus,

I had a similar problem and it got resolved when I lengthened my password.

May be, it helps you too!




Aniruddha

Hum4ngus 06-16-2007 06:07 AM

Thanks for the reply,

But it doesn't seem to work :(

Hum4ngus 06-16-2007 09:48 AM

I solved the problem.

i changed the line "AuthPAM off" to "AuthPAM on" in proftpd.conf

then checked /etc/pam.d/ftp and changed the shell of the user ftp to /bin/false and added it to /etc/shells

Zabzoo 10-29-2007 10:40 AM

please delete this post - my comment was wrong; my ftp server worked, but I back-tracked my steps to try and figure out exactly what caused the problem and after remove those; it still worked

:feeling pretty confused now: had no success for 2 weeks and now all of a sudden, she works and the worst of all is (still being happy it works) I dont know what I did to fix it, softoff takes all the phun out of it! sheez

sorry guys

Zabzoo 10-30-2007 09:26 AM

just and update - dont know if its worth your while, but I did discover what was the problem.

This file

/etc/pam.d/proftp

Has a line

autho required pam_shells.so

which was commented; I removed the comment, restarted my server (dont know how to restart the pam daemon) after doing that it worked; I tested it by commenting the line and restarting my box and then I was unable to get al loging again with the same error.

I am very happy to have discovered this.

I am using Ubuntu 7.04
I am using ProFTPD Version 1.3.0

My FTP users are users with a valid shell. Not sure what other information would be useful too.

thanks for a great forum

imagineers7 01-06-2008 09:22 AM

Hi Zabzoo,

Thanks for your reply... It will really help somebody



Aniruddha


All times are GMT -5. The time now is 05:09 AM.