FTP user can not log in

Discussion in 'General' started by Entangled, May 26, 2015.

  1. Entangled

    Entangled New Member

    Hello,

    I followed the Perfect Server setup and have several servers running in a Multiple Servers mode.

    Last week, I added another Wheezy Dedicated (single Client, multiple domains) Apache Server to the environment. Everything was running smoothly until today when the Client informs me that they aren't able to login using two of the three FTP accounts.

    The working FTP account happens to be the first account I setup and I also used the same username for the Shell account. The non-working FTP accounts do not have Shell accounts by the same username.

    I have searched and searched for answer to no avail.

    I finally got FTP working by creating Shell accounts with the same usernames.

    Anybody got an ideas why I needed to created the same username Shell accounts in order to get the FTP logins to work?


    OK ... I figured out why, but, I have not figured out the fix ... in the log:

    The SQL server seems to be down [Access denied for user 'root'@'localhost' (using password: YES)]

    In /etc/pure-ftpd/db/mysql.conf, there's this:

    # Mandatory : user to bind the server as.
    MYSQLUser root
    # Mandatory : user password. You must have a password.
    MYSQLPassword rootpw
    # Mandatory : database to open.
    MYSQLDatabase pureftpd

    It should have the correct the ispconfig/password/dbispconfig ... now, how do I get the password for ispconfig, I did not save it.
     
    Last edited: May 26, 2015
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The ispconfig mysql password is e.g. in the file /etc/pure-ftpd/db/mysql.conf
     
  3. Entangled

    Entangled New Member

    Thanks for the reply. Search the Forum led me to:

    /usr/local/ispconfig/interface/lib/config.inc.php

    which contains the info needed in /etc/pure-ftpd/db/mysql.conf

    I am no longer getting the SQL server down message but I am still not able to FTP into the server. I have VerboseLog = yes and PAMAuth = yes and syslog shows:

    May 26 09:33:14 raiders2 pure-ftpd: ([email protected]) [INFO] New connection from 97.80.178.92
    May 26 09:33:15 raiders2 pure-ftpd: ([email protected]) [DEBUG] Command [auth] [TLS]
    May 26 09:33:15 raiders2 pure-ftpd: ([email protected]) [INFO] SSL/TLS: Enabled TLSv1/SSLv3 with AES256-GCM-SHA384, 256 secret bits cipher
    May 26 09:33:15 raiders2 pure-ftpd: ([email protected]) [DEBUG] Command [user] [craigb2]
    May 26 09:33:15 raiders2 pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
    May 26 09:33:15 raiders2 pure-ftpd: ([email protected]) [INFO] PAM_RHOST enabled. Getting the peer address
    May 26 09:33:22 raiders2 pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [craigb2]
    May 26 09:33:22 raiders2 pure-ftpd: ([email protected]) [INFO] Logout.

    On "working" server, I have the same settings and I am getting more detail log in info then this and I am not getting the PAM_RHOST message.

    Should I do a remove --purge on pure-ftpd-mysql and pure-ftpd-common to do a fresh install with:

    apt-get -y install pure-ftpd-common pure-ftpd-mysql
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, you can try a reinstall.
     
  5. Entangled

    Entangled New Member

    I did the remove / purge and did a fresh install of pure-ftpd-mysql and pure-ftpd-common ... still not able to FTP and the log shows:

    May 26 10:01:34 raiders2 pure-ftpd: ([email protected]) [INFO] New connection from 97.80.178.92
    May 26 10:01:34 raiders2 pure-ftpd: ([email protected]) [DEBUG] Command [auth] [TLS]
    May 26 10:01:35 raiders2 pure-ftpd: ([email protected]) [INFO] SSL/TLS: Enabled TLSv1/SSLv3 with AES256-GCM-SHA384, 256 secret bits cipher
    May 26 10:01:35 raiders2 pure-ftpd: ([email protected]) [DEBUG] Command [user] [craigb2]
    May 26 10:01:35 raiders2 pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
    May 26 10:01:35 raiders2 pure-ftpd: ([email protected]) [INFO] PAM_RHOST enabled. Getting the peer address
    May 26 10:01:41 raiders2 pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [craigb2]
    May 26 10:01:41 raiders2 pure-ftpd: ([email protected]) [INFO] Logout.
     
  6. Entangled

    Entangled New Member

    I am fairly new to Debian / ISPConfig coming from CentOS / Hsphere, where do all these confs come from ... on a working server:

    -rw-r--r-- 1 root root 36 Jan 17 2012 AltLog
    -rw-r--r-- 1 root root 4 Feb 4 22:31 BrokenClientsCompatibility
    -rw-r--r-- 1 root root 4 Feb 4 22:31 ChrootEveryone
    -rw-r--r-- 1 root root 4 Feb 4 22:31 DisplayDotFiles
    -rw-r--r-- 1 root root 4 Feb 4 22:31 DontResolve
    -rw-r--r-- 1 root root 6 Jan 17 2012 FSCharset
    -rw-r--r-- 1 root root 5 Jan 17 2012 MinUID
    -rw-r--r-- 1 root root 29 Jan 17 2012 MySQLConfigFile
    -rw-r--r-- 1 root root 4 Jan 17 2012 NoAnonymous
    -rw-r--r-- 1 root root 4 Jan 17 2012 PAMAuthentication
    -rw-r--r-- 1 root root 12 May 24 22:50 PassivePortRange
    -rw-r--r-- 1 root root 28 Jan 17 2012 PureDB
    -rw-r--r-- 1 root root 2 May 24 22:40 TLS
    -rw-r--r-- 1 root root 116 May 25 00:03 TLSCipherSuite
    -rw-r--r-- 1 root root 3 Jan 17 2012 UnixAuthentication
    -rw-r--r-- 1 root root 4 May 26 01:45 VerboseLog

    From another working server (for comparison):

    -rw-r--r-- 1 root root 36 Oct 8 2012 AltLog
    -rw-r--r-- 1 root root 4 Apr 28 23:44 BrokenClientsCompatibility
    -rw-r--r-- 1 root root 4 Apr 28 23:44 ChrootEveryone
    -rw-r--r-- 1 root root 4 Apr 28 23:44 DisplayDotFiles
    -rw-r--r-- 1 root root 4 Apr 28 23:44 DontResolve
    -rw-r--r-- 1 root root 6 Oct 8 2012 FSCharset
    -rw-r--r-- 1 root root 5 Oct 8 2012 MinUID
    -rw-r--r-- 1 root root 29 Oct 8 2012 MySQLConfigFile
    -rw-r--r-- 1 root root 4 Oct 8 2012 NoAnonymous
    -rw-r--r-- 1 root root 4 Oct 8 2012 PAMAuthentication
    -rw-r--r-- 1 root root 28 Oct 8 2012 PureDB
    -rw-r--r-- 1 root root 2 May 24 17:48 TLS
    -rw-r--r-- 1 root root 51 May 24 17:50 TLSCipherSuite
    -rw-r--r-- 1 root root 3 Oct 8 2012 UnixAuthentication

    On the freshly reinstalled pure-ftpd non-working server:

    -rw-r--r-- 1 root root 36 Oct 8 2012 AltLog
    -rw-r--r-- 1 root root 6 Oct 8 2012 FSCharset
    -rw-r--r-- 1 root root 5 Oct 8 2012 MinUID
    -rw-r--r-- 1 root root 29 Oct 8 2012 MySQLConfigFile
    -rw-r--r-- 1 root root 4 Oct 8 2012 NoAnonymous
    -rw-r--r-- 1 root root 4 Oct 8 2012 PAMAuthentication
    -rw-r--r-- 1 root root 28 Oct 8 2012 PureDB
    -rw-r--r-- 1 root root 3 Oct 8 2012 UnixAuthentication

    I just added a test FTP account to another server, and it doesn't work either ... syslog shows:

    May 26 10:20:26 cp2 pure-ftpd: ([email protected]) [INFO] New connection from 97.80.178.92
    May 26 10:20:26 cp2 pure-ftpd: ([email protected]) [INFO] SSL/TLS: Enabled TLSv1/SSLv3 with AES256-GCM-SHA384, 256 secret bits cipher
    May 26 10:20:26 cp2 pure-ftpd: ([email protected]) [ERROR] The SQL server seems to be down [Access denied for user 'ispconfig'@'localhost' (using password: YES)]
    May 26 10:20:26 cp2 pure-ftpd: ([email protected]) [INFO] PAM_RHOST enabled. Getting the peer address
    May 26 10:20:33 cp2 pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [craigb3]
    May 26 10:20:33 cp2 pure-ftpd: ([email protected]) [INFO] Logout.

    I am clueless at this point ... HELP!
     
  7. Entangled

    Entangled New Member

    I got the "craigb3" (my 3rd FTP test server) working ... it happens to be the CP server too ... the ispconfig password in pure-ftp/db/mysql.conf was wrong ... updated it with correct passord and FTP now works.
     
  8. Entangled

    Entangled New Member

    Don't know if this really matters, but the non-working FTP server was brought up last week and is running:

    ISPC_APP_VERSION', '3.0.5.4p6

    While the working servers are running:

    ISPC_APP_VERSION', '3.0.5.4p5
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    There has nothing been changed related to FTP in these releases.
     
  10. Entangled

    Entangled New Member

    I didn't think 'p6' vs 'p5' would be the cause of this.

    I am going to do another remove/purge and a refresh install using the same sources.list that I used to build the "Perfect server' ... I had to screw around with different sources.list to get OpenSSH 6.7p1 installed on a Wheezy server to pass a PCI Compliance test ... I found the 6.7p1 package on 'jessie' using:

    deb http://ftp.debian.org/debian/ jessie main non-free contrib
    This only got me to OpenSSH 6.6:
    deb http://ftp.debian.org/debian/ wheezy-backports main non-free contrib

    So I am going back to the original sources.list to see if those pure-ftpd-mysql and pure-ftpd-common packages will work.

    Other than this, do you have any other suggestions?
     
  11. Entangled

    Entangled New Member

    FINALLY ... I got it to work ... not sure what caused it to not work or to start working but this is what I did:

    apt-get remove --purge pure-ftpd-mysql pure-ftp-common
    did the pure-ftpd-mysql install steps as defined in the Perfect Server doc
    did a ISPConfig update.php

    Now I have another issue ... "Permission denied" when trying to delete / remove the folders/files from the Shell user creation. I created the 2 Shell users with ISPConfig and I deleted the 2 Shell users with ISPConfig ... why ISPConfig didn't delete the folders/files it created is beyond me. I tried chattr -i ... same results ... I tried to move them into /private ... same results ... whoami shows root ... Geeee, I thought root was the Server God and could do anything ... I guess not.
     

Share This Page