Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
proftpd with mysql problem (Solved)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dudestir
n00b
n00b


Joined: 26 Apr 2005
Posts: 23

PostPosted: Tue Jun 14, 2005 3:30 am    Post subject: proftpd with mysql problem (Solved) Reply with quote

Hi all

I am attempting to get proftpd running with mysql but am getting an error

Code:

 tail /var/log/proftpd/proftpd.sql
Jun 10 20:29:22 mod_sql/4.11[18488]:  host: 'localhost'
Jun 10 20:29:22 mod_sql/4.11[18488]:    db: 'proftpd'
Jun 10 20:29:22 mod_sql/4.11[18488]:  port: '3306'
Jun 10 20:29:22 mod_sql/4.11[18488]:   ttl: '0'
Jun 10 20:29:22 mod_sql/4.11[18488]: exiting    mysql cmd_defineconnection
Jun 10 20:29:22 mod_sql/4.11[18488]: entering   mysql cmd_open
Jun 10 20:29:22 mod_sql/4.11[18488]: exiting    mysql cmd_open
Jun 10 20:29:22 mod_sql/4.11[18488]: unrecoverable backend error
Jun 10 20:29:22 mod_sql/4.11[18488]: error: '2002'
Jun 10 20:29:22 mod_sql/4.11[18488]: message: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)'


I'm using the 2005.0 kernel, on an AMD64 with the amd64 keywords

My use flags are

Code:

emerge -pv mysql

[ebuild   R   ] dev-db/mysql-4.1.12  +berkdb -cluster -debug +doc -extraengine -geometry -minimal +perl +readline (-selinux) +ssl -static +tcpd -utf8 0 kB

emerge -pv proftpd
[ebuild   R   ] net-ftp/proftpd-1.2.10-r1  -debug -hardened +ipv6 +ldap +mysql +pam -postgres (-selinux) -shaper -softquota +ssl +tcpd 0 kB


I have checked that mysql is running

Code:

rc-status
Runlevel: default
 ntp-client                                                                                                                  [ started ]
 sshd                                                                                                                        [ started ]
 lircd                                                                                                                       [ started ]
 local                                                                                                                       [ started ]
 mysql                                                                                                                       [ started ]
 vixie-cron                                                                                                                  [ started ]
 domainname                                                                                                                  [ started ]
 metalog                                                                                                                     [ started ]
 hdparm                                                                                                                      [ started ]
 net.eth0                                                                                                                    [ started ]
 net.eth1                                                                                                                    [ started ]
 splash                                                                                                                      [ started ]
 netmount                                                                                                                    [ started ]
 apache2                                                                                                                     [ started ]
 alsasound                                                                                                                   [ started ]
 proftpd                                                                                                                     [ started ]


Having read about the rights issue on the mysql folder and sock I have verified they are owned by mysql

Code:

ls -l /var/run/
drwxr-x---  2 mysql  mysql  112 Jun 12 22:06 mysqld

 ls -l my*
-rw-rw----  1 mysql mysql 5 Jun 12 22:06 mysqld.pid
srwxrwxrwx  1 mysql mysql 0 Jun 12 22:06 mysqld.sock




Here is my proftpd.conf file

Code:

ServerName           "ProFTPD"
ServerType           standalone
DefaultServer        on
ServerAdmin          me@mynetwork.com
ServerIdent          on         "My FTP"
DeferWelcome         off

Port                 27092
Umask                022

MaxInstances         5

AllowStoreRestart    on
AllowRetrieveRestart on

DefaultRoot          ~
RequireValidShell    on

AuthPAM              off
User                 nobody
Group                nogroup

TransferLog          /var/log/proftpd/proftpd.xferlog
AllowStoreRestart    on
AllowRetrieveRestart on
LogFormat            default "%h %l %u %t \"%r\" %s %b"
LogFormat            auth "%v [%P] %h %t \"%r\" %s"
LogFormat            write "%h %l %u %t \"%r\" %s %b"

# Log file/dir access
ExtendedLog          /var/log/proftpd/proftpd.access_log WRITE,READ write

# Record all logins
ExtendedLog          /var/log/proftpd/proftpd.auth_log AUTH auth

# Paranoia logging level....
ExtendedLog          /var/log/proftpd/proftpd.paranoid_log ALL default

<Directory /ftp/2/*>
  AllowOverwrite     on
<Limit ALL>
        AllowGroup vusers
        DenyAll
</Limit>

<Limit READ DIRS>
        AllowGroup readonly
#       DenyAll
</Limit>
</Directory>

<Limit LOGIN>
        AllowGroup vusers
       AllowGroup readonly
        DenyAll
</Limit>

<Global>
AllowForeignAddress  on
</Global>

SQLConnectInfo       proftpd@localhost proftpd mYsiTe
SQLAuthenticate      users groups
SQLAuthTypes         Crypt Backend
SQLUserInfo          users userid passwd uid gid homedir shell
SQLGroupInfo         groups groupid gid members
SQLLogFile           /var/log/proftpd/proftpd.sql

AccessGrantMsg       "If your FTP client supports TLS/SSL please use it! -IntraHouse"
TLSEngine            on
TLSLog               /var/log/proftpd/proftpdtls.log
TLSRequired          off
TLSOptions           NoCertRequest
TLSVerifyClient      off
TLSProtocol          TLSv1
TLSProtocol          SSLv23
#TLSRSACertificateFile    /etc/proftpd/ca/host.cert
#TLSRSACertificateKeyFile /etc/proftpd/crl/host.key
#TLSRSACertificateFile    /etc/proftpd/certs/host.pem


Can anyone please point me in the correct direction to resolve this.

Thanks

Dean


Last edited by dudestir on Sat Jul 09, 2005 9:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
dudestir
n00b
n00b


Joined: 26 Apr 2005
Posts: 23

PostPosted: Sat Jun 18, 2005 10:26 pm    Post subject: Reply with quote

bump
Back to top
View user's profile Send private message
Quincy
Apprentice
Apprentice


Joined: 02 Jun 2005
Posts: 201
Location: Germany

PostPosted: Sun Jun 19, 2005 2:05 am    Post subject: Re: proftpd with mysql problem Reply with quote

I've only seen this error when proftpd can't access the mysql socket....and look at your permissions of /var/run/mysqld

You have:
Code:
drwxr-x---  2 mysql  mysql  112 Jun 12 22:06 mysqld


I have:
Code:
drwxr-xr-x  2 mysql  mysql  4096 18. Jun 15:43 mysqld


See the difference?
Back to top
View user's profile Send private message
dudestir
n00b
n00b


Joined: 26 Apr 2005
Posts: 23

PostPosted: Sat Jul 09, 2005 9:46 pm    Post subject: Reply with quote

Thanks

The directory rights were the exact issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum