LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Cannot login to FTP (proftpd) with a single user on Debian Squeeze (http://www.linuxquestions.org/questions/linux-server-73/cannot-login-to-ftp-proftpd-with-a-single-user-on-debian-squeeze-892523/)

reverend_hh 07-19-2011 10:24 AM

Cannot login to FTP (proftpd) with a single user on Debian Squeeze
 
Hi everyone,

So I've been trying to get a single user to login to an FTP site I've created using proftpd and I haven't had much luck. So check this out: this only applies to one user, I can "su" to the user account so I know the password is set, and I am even able to SSH into the box as this user. This totally eliminates a bad/incorrect password and the server IS accepting connections on port 21 because I can FTP as other users. I've ruled out the client because I tried locally and using a command prompt from Winders but still no luck. This is what I'm seeing in the logs when I attempt to connect using an FTP client.

::ffff:192.168.1.118 UNKNOWN proftpd [18/Jul/2011:15:57:44 -0700] "USER crownftp" 331 -


Jul 18 15:57:44 ctserver-2 proftpd: pam_unix(proftpd:session): session opened for user crownftp by (uid=0)
Jul 18 15:57:44 ctserver-2 proftpd: pam_unix(proftpd:session): session closed for user crownftp

proftpd -l shows the following
Compiled-in modules:
mod_core.c
mod_xfer.c
mod_auth_unix.c
mod_auth_file.c
mod_auth.c
mod_ls.c
mod_log.c
mod_site.c
mod_delay.c
mod_facts.c
mod_dso.c
mod_ident.c
mod_auth_pam.c
mod_readme.c
mod_cap.c
mod_ctrls.c
mod_lang.c

Like I said, I can authenticate into the box with SSH and su but not thru FTP. What gives?

p_s_shah 07-20-2011 02:59 AM

Login as root?
 
Quote:

Jul 18 15:57:44 ctserver-2 proftpd: pam_unix(proftpd:session): session opened for user crownftp by (uid=0)
Jul 18 15:57:44 ctserver-2 proftpd: pam_unix(proftpd:session): session closed for user crownftp
From above logs, it looks like UID of crownftp is 0, or it is trying to login as root while using FTP.
Please check below link:
http://www.proftpd.org/docs/directiv...RootLogin.html

Quote:

Normally, proftpd disallows root logins under any circumstance. If a client attempts to login as root, using the correct password, a special security message is sent to syslog. When the RootLogin directive is turned On, the root user may authenticate just as any other user could (assuming no other access control measures deny access); however the root login security message is still sysloged. Obviously, extreme care should be taken when using this directive.

The use of RootLogin in the Anonymous context is only valid when the User / Group defined in the Anonymous block is set to 'root'

reverend_hh 07-20-2011 12:40 PM

Thank you for your reply, you pointed me in the right direction. The entry in my proftpd.conf has the default directory to point to ~/FTP which was owned by root, therefore causing the login to fail due to a permissions issue.

Edit: ok so I thought it was fixed by the problem persists. When I check the logs I'm noticing all the users have the uid=0 and some are able to login while others aren't. I even enabled RootLogin just for testing and it still didn't work. Suggestions?

Final edit: I did some more digging around and it looks like I was right in the first place, as it only applied to a certain user. As I mentioned before, I still noticed all the users are trying to login with the uid=0. What's that about?


All times are GMT -5. The time now is 01:08 AM.