ftp user problem

Discussion in 'General' started by jalapela, Nov 15, 2010.

  1. jalapela

    jalapela Member

    Help me please i'm going to crazy

    I was reinstall my server again for that problem.I did exacly the same this tutorial (http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3)
    My server based on
    Debian Linux 5.0
    Linux 2.6.26-2-amd64 on x86_64

    My problem is:When i create ftp user for some domain.I can see it on ispconfig,but when i login with ftp client (filezilla) client says ftp login faild.There is a log under the window.Please help me

    Yanıt: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    Yanıt: 220-You are user number 1 of 50 allowed.
    Yanıt: 220-Local time is now 18:03. Server port: 21.
    Yanıt: 220-This is a private system - No anonymous login
    Yanıt: 220-IPv6 connections are also welcome on this server.
    Yanıt: 220 You will be disconnected after 15 minutes of inactivity.
    Komut: USER 123456
    Yanıt: 331 User 123456 OK. Password required
    Komut: PASS *
    Yanıt: 530 Login authentication failed
     
  2. mesoto

    mesoto New Member

    Open Ports ? 21 for active mode.

    What say netstat ? Check auth.log and syslog for errors?

    Force your ftp client to work only in active mode.
     
  3. config.zerosub.de

    config.zerosub.de New Member

    I'm having the exact same Problem:
    - Add a client
    - add site
    - add a ftp user

    ftpuser will not be able to login.
    i have the right name (with prefix) and i changed passwords back and forth.
    Old Users i added via the same interface are working.

    I enabled verbose logging for pure-ftpd as described here:
    http://www.faqforge.com/linux/contr...enable-debugging-in-pure-ftpd-on-debian-linux

    All i can see in the logfiles is the following:
    Nov 15 22:14:16 webhost pure-ftpd: ([email protected]) [INFO] New connection from xxx.xxx.xxx.xxx
    Nov 15 22:14:16 webhost pure-ftpd: ([email protected]) [DEBUG] Command [user] [prefix_suffix]
    Nov 15 22:14:16 webhost pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
    Nov 15 22:14:16 webhost pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [prefix_suffix]
    Nov 15 22:14:20 webhost pure-ftpd: ([email protected]) [INFO] Logout.


    Could there be a problem with writing the passwords correctly into the mysql database?
    Maby through one of the last updates ?

    By the way, the same applies to newly created shell users.

    Any Help / Hint is greatly appreciated.
     
  4. jalapela

    jalapela Member

  5. jalapela

    jalapela Member

    maybe for the quota

    maybe somethings wrong with the quota in fstab
    my original fstab is
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    /dev/mapper/firewall-root / ext3 errors=remount-ro 0 1
    /dev/sda1 /boot ext2 defaults 0 2
    /dev/mapper/firewall-swap_1 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

    then i reconfigure it like this
    proc /proc proc defaults 0 0
    /dev/mapper/firewall-root / ext3 errors=remount-ro 0 1
    /dev/sda1 /boot ext2 errors=remount-ro,usrquota,grpquota 0 2

    /dev/mapper/firewall-swap_1 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Did you try both active and passive transfers in your FTP client?

    Is this a physical server or a virtual machine?
     
  7. jalapela

    jalapela Member

    yes i try active & passive connetion.

    This is a physical server
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Are you absolutely sure that you use the correct username and password?
     
  9. jalapela

    jalapela Member

    of course :)
     
  10. jalapela

    jalapela Member

    can i add&change ftp user (username&password) without ispconfig?
     
  11. mesoto

    mesoto New Member

  12. config.zerosub.de

    config.zerosub.de New Member

    Mine is a virtual machine.
    Does that matter?

    I have old accounts which still work. I can perfectly login with them an transfer files. But as soon as i create a new one ... it will not let me in.
     
    Last edited: Nov 24, 2010
  13. config.zerosub.de

    config.zerosub.de New Member

    NEWS:

    i've tried an old password from the DB and i could not login using that.
    Digging further i foun out, that the folder i'm trying to login to still belongs to root.
    When i try to change the permissions on the folder, i get the message that the user "web11" does not exist.

    So neither the user "web11" nor the group "client5" has been created.
    And the rights of the folder haven't(therefore?) been set, too.

    How can this happen and what can i do to fix this?
    I would like to have it working automatically again.
    Still, any help is greatly appreciated.
     
  14. audibull

    audibull New Member

    So I'm having pretty much the same issue, accounts created by clients under ISPConfig aren't able to login, but a manually created shell account works without issue.

    I turned on verbose logging for pure-ftpd and with an incorrect password I get the following:

    Nov 24 21:48:04 stock pure-ftpd: ([email protected]) [INFO] New connection from x.x.104.200
    Nov 24 21:48:05 stock pure-ftpd: ([email protected]) [DEBUG] Command [auth] [TLS]
    Nov 24 21:48:05 stock pure-ftpd: ([email protected]) [INFO] SSL/TLS: Enabled TLSv1/SSLv3 with AES256-SHA, 256 secret bits cipher
    Nov 24 21:48:06 stock pure-ftpd: ([email protected]) [DEBUG] Command [pbsz] [0]
    Nov 24 21:48:06 stock pure-ftpd: ([email protected]) [DEBUG] Command [user] [xxxxxxxxxx]
    Nov 24 21:48:07 stock pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
    Nov 24 21:48:07 stock pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [xxxxxxxxxx]
    Nov 24 21:48:11 stock pure-ftpd: ([email protected]) [INFO] Logout.

    With a correct password it shows:

    Nov 24 21:49:24 stock pure-ftpd: ([email protected]) [INFO] New connection from x.x.104.200
    Nov 24 21:49:24 stock pure-ftpd: ([email protected]) [DEBUG] Command [auth] [TLS]
    Nov 24 21:49:25 stock pure-ftpd: ([email protected]) [INFO] SSL/TLS: Enabled TLSv1/SSLv3 with AES256-SHA, 256 secret bits cipher
    Nov 24 21:49:25 stock pure-ftpd: ([email protected]) [DEBUG] Command [pbsz] [0]
    Nov 24 21:49:26 stock pure-ftpd: ([email protected]) [DEBUG] Command [user] [xxxxxxxxxx]
    Nov 24 21:49:26 stock pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]

    And then just times out. Logging into an account that has a valid shell gives:

    Nov 24 21:51:02 stock pure-ftpd: ([email protected]) [INFO] New connection from x.x.104.200
    Nov 24 21:51:02 stock pure-ftpd: ([email protected]) [DEBUG] Command [auth] [TLS]
    Nov 24 21:51:03 stock pure-ftpd: ([email protected]) [INFO] SSL/TLS: Enabled TLSv1/SSLv3 with AES256-SHA, 256 secret bits cipher
    Nov 24 21:51:04 stock pure-ftpd: ([email protected]) [DEBUG] Command [pbsz] [0]
    Nov 24 21:51:04 stock pure-ftpd: ([email protected]) [DEBUG] Command [user] [xxxxxxxxxx ]
    Nov 24 21:51:04 stock pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
    Nov 24 21:51:04 stock pure-ftpd: ([email protected]) [INFO] PAM_RHOST enabled. Getting the peer address
    Nov 24 21:51:04 stock pure-ftpd: ([email protected]) [INFO] xxxxxxxxxx is now logged in
    Nov 24 21:51:05 stock pure-ftpd: ([email protected]) [DEBUG] Command [syst] []
    Nov 24 21:51:05 stock pure-ftpd: ([email protected]) [DEBUG] Command [feat] []
    Nov 24 21:51:06 stock pure-ftpd: ([email protected]) [DEBUG] Command [pwd] []
    Nov 24 21:51:06 stock pure-ftpd: ([email protected]) [DEBUG] Command [type] [A]
    Nov 24 21:51:06 stock pure-ftpd: ([email protected]) [DEBUG] Command [prot] [P]
    Nov 24 21:51:07 stock pure-ftpd: ([email protected]) [DEBUG] Command [prot] [C]
    Nov 24 21:51:07 stock pure-ftpd: ([email protected]) [DEBUG] Command [pasv] []
    Nov 24 21:51:08 stock pure-ftpd: ([email protected]) [DEBUG] Command [mlsd] []

    And then continues to function correctly. I'm a bit stumped here.

    I also verified through MySQL/phpmyadmin that when changing the password in ISPConfig that it does indeed change the password in the MySQL db, I guess pure-ftpd isn't talking to MySQL properly for the virtual users? But that can't be right because obviously there is a distinction between the password being correct and incorrect.

    EDIT: Disabling TLS had no effect, everything looks fine in the entry in the mysql database, created another couple of accounts avoiding symbols and still the same issue, if the password is correct it just disconnects with nothing in the logs, if the password is incorrect it gives [WARNING] Authentication failed for user.

    EDIT2: So it seems to be a chroot issue, I changed ChrootEveryone to 'no' and the accounts can now log in fine, but they're not chrooted. Guess I'll have to keep digging.

    EDIT3: Yep, I had my permissions screwed on a folder. 36 hours without sleep'll do that to you, I'll leave this up incase someone else manages to do the same thing.
     
    Last edited: Nov 24, 2010
  15. falko

    falko Super Moderator Howtoforge Staff

  16. config.zerosub.de

    config.zerosub.de New Member

    Thnx Falko for the hint,

    but mine is running under VirtualBox.
    And it's definately a useradd / groupadd / chmod problem.
    Everything is written well to the Mysql-DB an pure-ftpd is acting like it should:
    the user that is trying to login simply does not have the rights for the directory ...

    After i added the user web11 manually and changed the ownership to this user - all went fine.
    But the question is: where in the process of creating a new user does this (not) happen? Where/How can i trace the problem?
     

Share This Page