Titel: Probleme mit mod_sql auf debian Beitrag von: Dominik am 29. Januar 2005, 13:10:08 Hi,
ich versuche hier gerade, proftpds mod_sql zum Laufen zu bekommen... Folgende Konfiguration: proftpd.conf: Code: (~)# cat /etc/proftpd.conf ServerName "FTP" ServerType standalone DeferWelcome on UseReverseDNS off IdentLookups off ShowSymlinks on MultilineRFC2228 on DefaultServer on ShowSymlinks on AllowOverwrite on TimeoutNoTransfer 600 TimeoutStalled 600 TimeoutIdle 1200 DisplayConnect /etc/proftpd.d/connect.msg DisplayLogin welcome.msg DisplayFirstChdir .message ListOptions "-l" DenyFilter \*.*/ TransferLog /var/log/proftpd/proftpd.xferlog 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" ExtendedLog /var/log/proftpd/proftpd.access_log WRITE,READ write ExtendedLog /var/log/proftpd/proftpd.auth_log AUTH auth Port 21 MaxInstances 30 User nobody Group nogroup <Directory /*> Umask 022 022 AllowOverwrite on </Directory> <Global> DefaultRoot ~ RequireValidShell off MaxClients none MaxClientsPerHost 3 "Es sind nur drei Verbindungen gleichzeitig erlaubt!" ServerIdent on </Global> SystemLog /var/log/proftpd/proftpd.error_log <IfModule mod_tls.c> TLSEngine on TLSLog /var/log/proftpd/proftpd.tls_log TLSProtocol SSLv23 TLSOptions NoCertRequest TLSRequired off TLSRSACertificateFile /etc/proftpd.d/ldapcert.pem TLSRSACertificateKeyFile /etc/proftpd.d/ldapkey.pem TLSCACertificateFile /etc/proftpd.d/demoCA/cacert.pem TLSVerifyClient off </IfModule> SQLAuthenticate users SQLAuthTypes Plaintext SQLConnectInfo proftpd@localhost proftpd passwd SQLDefaultGID 65534 SQLDefaultUID 65534 SQLMinUserGID 1000 SQLMinUserUID 500 SQLUserInfo ftp username password uid gid homedir shell SQLLogFile /var/log/proftpd/proftpd.sql.log Versionen: Code: (~)# proftpd -vv - Version: 1.2.9 (stable) - Scoreboard Version: 01040002 - Build Stamp: do mrt 22 18:28:32 CET 2001 (~)# mysql -V mysql Ver 14.7 Distrib 4.1.8a, for pc-linux-gnu (i386) (beide von backports.org) OK soweit. Proftpd gestartet mit proftpd -nd5 und ein login-Versuch vom localhost mit einem nicht-sql-user: Loginversuch: Code: telnet localhost 21 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 ProFTPD 1.2.9 Server ready. user myuser 331 Password required for myuser. pass abc Connection closed by foreign host. Die dazugehörigen Ausgaben von der shell, wo proftpd gestartet wurde: Code: (~)# proftpd -nd5 - parsing '/etc/proftpd.conf' configuration - Compiling deny regex '\*.*/'. - Allocated deny regex at location 0x80e0e00. - <Directory /*>: adding section for resolved path '/*' - <IfModule>: found 'mod_tls.c' module xxx.de - xxx.de - Config for FTP: xxx.de - /* xxx.de - Umask xxx.de - DirUmask xxx.de - AllowOverwrite xxx.de - ShowSymlinks xxx.de - DisplayLogin xxx.de - DisplayFirstChdir xxx.de - ListOptions xxx.de - DenyFilter xxx.de - TransferLog xxx.de - SQLAuthenticate xxx.de - SQLAuthTypes xxx.de - SQLConnectInfo xxx.de - SQLDefaultGID xxx.de - SQLDefaultUID xxx.de - SQLMinUserGID xxx.de - SQLMinUserUID xxx.de - RequireValidShell xxx.de - MaxClients xxx.de - MaxClientsPerHost xxx.de - DeferWelcome xxx.de - IdentLookups xxx.de - ShowSymlinks xxx.de - DefaultServer xxx.de - ShowSymlinks xxx.de - AllowOverwrite xxx.de - TimeoutNoTransfer xxx.de - TimeoutStalled xxx.de - TimeoutIdle xxx.de - DisplayConnect xxx.de - DisplayLogin xxx.de - DisplayFirstChdir xxx.de - ListOptions xxx.de - DenyFilter xxx.de - TransferLog xxx.de - ExtendedLog xxx.de - ExtendedLog xxx.de - UserID xxx.de - UserName xxx.de - GroupID xxx.de - GroupName xxx.de - TLSEngine xxx.de - TLSLog xxx.de - TLSOptions xxx.de - TLSRequired xxx.de - TLSRSACertificateFile xxx.de - TLSRSACertificateKeyFile xxx.de - TLSCACertificateFile xxx.de - TLSVerifyClient xxx.de - SQLAuthenticate xxx.de - SQLAuthTypes xxx.de - SQLConnectInfo xxx.de - SQLDefaultGID xxx.de - SQLDefaultUID xxx.de - SQLMinUserGID xxx.de - SQLMinUserUID xxx.de - SQLUserTable xxx.de - SQLUsernameField xxx.de - SQLPasswordField xxx.de - SQLUidField xxx.de - SQLGidField xxx.de - SQLHomedirField xxx.de - SQLShellField xxx.de - SQLLogFile xxx.de - DefaultRoot xxx.de - RequireValidShell xxx.de - MaxClients xxx.de - MaxClientsPerHost xxx.de - ServerIdent xxx.de - ProFTPD 1.2.9 (stable) (built do mrt 22 18:28:32 CET 2001) standalone mode STARTUP xxx.de (127.0.0.1[127.0.0.1]) - connected - local : 127.0.0.1:21 xxx.de (127.0.0.1[127.0.0.1]) - connected - remote : 127.0.0.1:44797 xxx.de (127.0.0.1[127.0.0.1]) - FTP session opened. xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER myuser' to mod_rewrite xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER myuser' to mod_tls xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER myuser' to mod_core hs-webservices.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER myuser' to mod_core xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'USER myuser' to mod_auth xxx.de (127.0.0.1[127.0.0.1]) - dispatching CMD command 'USER myuser' to mod_ratio xxx.de (127.0.0.1[127.0.0.1]) - dispatching CMD command 'USER myuser' to mod_auth xxx.de (127.0.0.1[127.0.0.1]) - dispatching POST_CMD command 'USER myuser' to mod_sql xxx.de (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'USER myuser' to mod_sql xxx.de (127.0.0.1[127.0.0.1]) - dispatching LOG_CMD command 'USER myuser' to mod_log xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_rewrite xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_tls xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_core xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_wrap xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_radius xxx.de (127.0.0.1[127.0.0.1]) - dispatching PRE_CMD command 'PASS (hidden)' to mod_auth xxx.de (127.0.0.1[127.0.0.1]) - dispatching CMD command 'PASS (hidden)' to mod_auth xxx.de (127.0.0.1[127.0.0.1]) - ProFTPD terminating (signal 11) xxx.de (127.0.0.1[127.0.0.1]) - FTP session closed. xxx.de - ProFTPD terminating (signal 2) xxx.de - ProFTPD 1.2.9 standalone mode SHUTDOWN Das SQL-Log gibt folgendes von sich: Code: Jan 29 12:59:20 mod_sql/4.10[4543]: backend module 'mod_sql_mysql/4.04' Jan 29 12:59:20 mod_sql/4.10[4543]: backend api 'mod_sql_api_v1' Jan 29 12:59:20 mod_sql/4.10[4543]: >>> sql_getconf Jan 29 12:59:20 mod_sql/4.10[4543]: entering mysql cmd_defineconnection Jan 29 12:59:20 mod_sql/4.10[4543]: name: 'default' Jan 29 12:59:20 mod_sql/4.10[4543]: user: 'proftpd' Jan 29 12:59:20 mod_sql/4.10[4543]: host: 'localhost' Jan 29 12:59:20 mod_sql/4.10[4543]: db: 'proftpd' Jan 29 12:59:20 mod_sql/4.10[4543]: port: '3306' Jan 29 12:59:20 mod_sql/4.10[4543]: ttl: '0' Jan 29 12:59:20 mod_sql/4.10[4543]: exiting mysql cmd_defineconnection Jan 29 12:59:20 mod_sql/4.10[4543]: backend will not be checked until first use. Jan 29 12:59:20 mod_sql/4.10[4543]: mod_sql status : on Jan 29 12:59:20 mod_sql/4.10[4543]: negative_cache : off Jan 29 12:59:20 mod_sql/4.10[4543]: authenticate : users Jan 29 12:59:20 mod_sql/4.10[4543]: usertable : ftp Jan 29 12:59:20 mod_sql/4.10[4543]: userid field : username Jan 29 12:59:20 mod_sql/4.10[4543]: password field : password Jan 29 12:59:20 mod_sql/4.10[4543]: uid field : uid Jan 29 12:59:20 mod_sql/4.10[4543]: gid field : gid Jan 29 12:59:20 mod_sql/4.10[4543]: homedir field : homedir Jan 29 12:59:20 mod_sql/4.10[4543]: shell field : shell Jan 29 12:59:20 mod_sql/4.10[4543]: homedirondemand : false Jan 29 12:59:20 mod_sql/4.10[4543]: SQLMinUserUID : 500 Jan 29 12:59:20 mod_sql/4.10[4543]: SQLMinUserGID : 100 Jan 29 12:59:20 mod_sql/4.10[4543]: <<< sql_getconf Jan 29 12:59:27 mod_sql/4.10[4543]: >>> cmd_getpwnam Jan 29 12:59:27 mod_sql/4.10[4543]: entering mysql cmd_escapestring Da bricht es dann ab und der Server verabschiedet sich mit einem Signal 11. Der Nutzer ist ein shell-Nutzer, gleiches Problem gibt es aber auch bei nicht-existenten Nutzern sowie bei solchen, die in die Datenbank eingetragen sind. Starte ich den Server mit obiger Konfiguration ohne die sql-Anweisungen, funktioniert alles hervorragend. Kann mir irgendwer helfen??? Gruß, Dominik PS: Ich hoffe, ich habe alles wichtige genannt, sollte noch irgendwas an Infos fehlen liefere ich das gerne nach. Titel: Probleme mit mod_sql auf debian Beitrag von: Wörsty am 29. Januar 2005, 23:58:32 Proftpd und Debian ist ein Thema für sich.
Bemühe mal die Forensuche. Stichwörter: Debian und mysql +
Titel: [solved] Beitrag von: Dominik am 11. Februar 2005, 13:52:00 Hi,
einen Tag nach meinem Beitrag wurden die MySQL-Devel-Pakete aktualisiert und es wurde das libmysqlclient-dev auf die 4.x-Version aktualisiert. Damit funktionierte dann auch die (manuelle) Kompilation des aktuellen proftpd mit sql-Unterstützung. Gruß und Dank, Dominik |