pureFTP with mysql authentication RHEL 3

Discussion in 'HOWTO-Related Questions' started by jmantra, Sep 19, 2007.

  1. jmantra

    jmantra New Member

    Hi I am having trouble setting up pureFTPd with mysql authetication, I compiled since I am using an older version of redhat, I followed the one for CentOS 5 since thats the closest distro to RHEL 3. When I try to run it I get:

    421: Configuration Error: Invalid SQL Configuration File: /etc/pureftpd-mysql.conf

    here the config file for the mysql config file:

    Code:
    MYSQLSocket      /var/lib/mysql/mysql.sock
    MYSQLServer     localhost
    MYSQLPort       3306
    MYSQLUser       pureftpd
    MYSQLPassword   ftpdpass
    MYSQLDatabase   pureftpd
    #MYSQLCrypt md5, cleartext, crypt() or password() - md5 is VERY RECOMMENDABLE uppon cleartext
    MYSQLCrypt      md5
    MYSQLGetPW      SELECT Password FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MYSQLGetUID     SELECT Uid FROM ftpd WHERE User="\L" AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MYSQLGetGID     SELECT Gid FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MYSQLGetDir     SELECT Dir FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MySQLGetBandwidthUL SELECT ULBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MySQLGetBandwidthDL SELECT DLBandwidth FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MySQLGetQTASZ   SELECT QuotaSize FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    MySQLGetQTAFS   SELECT QuotaFiles FROM ftpd WHERE User="\L"AND status="1" AND (ipaccess = "*" OR ipaccess LIKE "\R")
    am I missing something here? the port is correct, it's running on the local machine, and that is the correct path for the mysql.sock file :confused:
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Is there a more detailed error message in your logs, or can you switch on debugging for Pure-FTPd?
     
  3. dpcosta

    dpcosta New Member

    apologies in advance for reviving what seems to be an old post, but this may be useful as reference for others...

    I believe the reason this specific configuration file isn't working is due to both the mysql socket and server/port sections being uncommented. If the mysql server is running on the same machine as the pureftp server there is no need to use the server/port lines. The socket line should be enough.
     

Share This Page