FTP error 530

Discussion in 'Installation/Configuration' started by Gouri, Nov 14, 2013.

  1. Gouri

    Gouri New Member

    Hello everyone,
    I used to use webmin/virtualmin and started using ISPConfig3 only recently. However, I like it better, everything is just more sober, easy to find and simple, really great work!

    Anyway, I've been trying out stuff on several servers and lately I came accross one situation : I've installed ISPConfig3, set up domains, databases, ftps and everything was working well. However, I've installed Open Game Panel afterwards, to check it out and I think that allowing it to manage pure-ftpd might have been my mistake.

    Ever since I did, the FTP users created by ISPConfig aren't allowed to log in anymore.
    Code:
    USER defaultnofi
    331 User defaultnofi OK. Password required
    PASS ***************
    530 Login authentication failed
    Even though it was working just fine before...

    Could anyone confirm that? I might have to use Open Game Panel (http://sourceforge.net/projects/hldstart/ and http://www.opengamepanel.org/) on one or two servers in the future and wanted to check out what I was getting into.

    Thanks for your time.
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    You could simply verify that by running the ISPConfig update.php script and saying "reconfigure services: YES".
    If everything works again after this, the game server you installed has altered the ftp server config, making it unusable by ISPConfig users.
     
  3. Gouri

    Gouri New Member

    Thanks, it's what I assumed, but when I'm running
    Code:
    ispconfig_update.sh
    , it doesn't ask me for anything, it just says that there is no update available. Or maybe I am doing it wrong/using a wrong file?
    I did an updatedb and locate and didn't find an "update.php" file related to ISPConfig.

    Sorry, blonde moment I guess. One more of those...
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    ;)

    Download the stable release of ispconfig, as if it were a new one.
    Goto install/ folder and execute php -q update.php
     
  5. Gouri

    Gouri New Member

    Hum, I did that, and restaured the configuration, but I still can't login, that's weird.
    Any idea?
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Please look at (and maybe post) the different pure-ftpd config files here, including the mysql config (don't forget to anonymize personal data).
     
  7. Gouri

    Gouri New Member

    Code:
    In /etc/pure-ftpd/conf/ :
    AltLog: clf:/var/log/pure-ftpd/transfer.log
    BrokenClientsCompatibility: yes
    ChrootEveryone: yes
    CreateHomeDir: yes
    DisplayDotFiles: yes
    DontResolve: yes
    FSCharset: UTF-8
    MinUID: 1000
    MySQLConfigFile: /etc/pure-ftpd/db/mysql.conf
    NoAnonymous: yes
    PAMAuthentication: no
    PureDB: /etc/pure-ftpd/pureftpd.pdb
    TLS: 1
    UnixAuthentication: no

    Code:
    In /etc/pure-ftpd/db/mysql.conf :
    Code:
    ##############################################
    #                                            #
    # Sample Pure-FTPd Mysql configuration file. #
    # See README.MySQL for explanations.         #
    #                                            #
    ##############################################
    
    
    # Optional : MySQL server name or IP. Don't define this for unix sockets.
    
    MYSQLServer     127.0.0.1
    
    
    # Optional : MySQL port. Don't define this if a local unix socket is used.
    
    # MYSQLPort       3306
    
    
    # Optional : define the location of mysql.sock if the server runs on this host.
    
    # MYSQLSocket      /var/run/mysqld/mysqld.sock
    
    
    # Mandatory : user to bind the server as.
    
    MYSQLUser       the right one
    
    
    # Mandatory : user password. You must have a password.
    
    MYSQLPassword   1234 (joking, of freaking course)
    
    
    # Mandatory : database to open.
    
    MYSQLDatabase   the right one too
    
    
    # Mandatory : how passwords are stored
    # Valid values are : "cleartext", "crypt", "md5" and "password"
    # ("password" = MySQL password() function)
    # You can also use "any" to try "crypt", "md5" *and* "password"
    
    MYSQLCrypt      crypt
    
    
    # In the following directives, parts of the strings are replaced at
    # run-time before performing queries :
    #
    # \L is replaced by the login of the user trying to authenticate.
    # \I is replaced by the IP address the user connected to.
    # \P is replaced by the port number the user connected to.
    # \R is replaced by the IP address the user connected from.
    # \D is replaced by the remote IP address, as a long decimal number.
    #
    # Very complex queries can be performed using these substitution strings,
    # especially for virtual hosting.
    
    
    # Query to execute in order to fetch the password
    
    MYSQLGetPW      SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '1' AND username="\L"
    
    # Query to execute in order to fetch the system user name or uid
    
    MYSQLGetUID     SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '1' AND username="\L"
    
    
    # Optional : default UID - if set this overrides MYSQLGetUID
    
    #MYSQLDefaultUID 1000
    
    
    # Query to execute in order to fetch the system user group or gid
    
    MYSQLGetGID     SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '1' AND username="\L"
    
    
    # Optional : default GID - if set this overrides MYSQLGetGID
    
    #MYSQLDefaultGID 1000
    
    
    # Query to execute in order to fetch the home directory
    
    MYSQLGetDir     SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '1' AND username="\L"
    
    
    # Optional : query to get the maximal number of files
    # Pure-FTPd must have been compiled with virtual quotas support.
    
    MySQLGetQTAFS  SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '1' AND quota_files != '-1' AND username="\L"
    
    
    # Optional : query to get the maximal disk usage (virtual quotas)
    # The number should be in Megabytes.
    # Pure-FTPd must have been compiled with virtual quotas support.
    
    MySQLGetQTASZ  SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '1' AND quota_size != '-1' AND username="\L"
    
    
    # Optional : ratios. The server has to be compiled with ratio support.
    
    MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '1' AND ul_ratio != '-1' AND username="\L"
    MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '1' AND dl_ratio != '-1' AND username="\L"
    
    
    # Optional : bandwidth throttling.
    # The server has to be compiled with throttling support.
    # Values are in KB/s .
    
    MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '1' AND ul_bandwidth != '-1' AND username="\L"
    MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '1' AND dl_bandwidth != '-1' AND username="\L"
    
    # Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
    # 1) You know what you are doing.
    # 2) Real and virtual users match.
    
    # MySQLForceTildeExpansion 1
    
    
    # If you upgraded your tables to transactionnal tables (Gemini,
    # BerkeleyDB, Innobase...), you can enable SQL transactions to
    # avoid races. Leave this commented if you are using the
    # traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.
    
    MySQLTransactions On
                            
    
    Everything looks decent?
     
  8. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    You said "Database" is correct. Is it "dbispconfig"? That's what it should be.
     
  9. Gouri

    Gouri New Member

    Yes, it is.
     
  10. Gouri

    Gouri New Member

    Any idea, please?
     
  11. tanius

    tanius New Member

    Check if SQL queries arrive.

    You might want to temporarily enable SQL logging to see if your pureftpd does talk to your MySQL at all. I have documented how to do this while just having the same issue:

    How to fix “530 Login authentication failed” for ISPConfig FTP logins?

    For other readers, I have collected and documented some of the other possible solutions to the "530 Login authentication failed" in ISPConfig there. Good luck, everyone.
     
  12. Gouri

    Gouri New Member

    Thanks, your blog post lead me, I found out owing to it that there's a "bug/issue" with pure-ftpd-myqsl. OPG (open game panel) uninstalled it and installed pure-ftpd instead but when I would restart the service, it wouldn't tell me!
    So all I had to do was to reinstall pure-ftpd-mysql and it works again.
     

Share This Page