www.ProFTPD.de
13. März 2007, 21:21:42 *
Willkommen Gast. Bitte einloggen oder registrieren.
Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge
News: SMF - Neu installiert!
 
   Übersicht   Hilfe Suche Login Registrieren  
Seiten: [1]   Nach unten
  Drucken  
Autor Thema: proftpd + mod_sql_mysql  (Gelesen 472 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
Christoph
ProFTPD
*
Offline Offline

Beiträge: 6


Profil anzeigen
« am: 26. Oktober 2004, 12:25:11 »

Hallo,

versuche gerade vergeblich proftpd mit mysql zum laufen zu bringen. Er startet ganz normal, syntax der config ist ok, mysql läuft usw.

Wenn ich mich jetzt mit "ftp localhost" einloggen will, kommt ne Fehlermeldung:
Code:
421 Service not available, remote server has closed connection


Habe dann folgende Fehlermeldung in der /var/log/proftpd.system.log
Code:

Oct 26 11:31:51 xxx proftpd[26889] : ProFTPD 1.2.10 (stable) (built Tue Oct 26 11:22:24 CEST 2004) standalone mode STARTUP
Oct 26 11:31:58 xxx proftpd[26892] (localhost[127.0.0.1]): FTP session requested from unknown class
Oct 26 11:31:58 xxx proftpd[26892] (localhost[127.0.0.1]): ProFTPD terminating (signal 11)
Oct 26 11:31:58 xxx proftpd[26892] (localhost[127.0.0.1]): FTP session closed.


Ich starte den Server mit der Option "-d 5"


/etc/proftpd.conf
Code:

grep -v '^#' /etc/proftpd.conf

ServerName "SERVERNAME"
ServerType standalone

DeferWelcome on

User proftpd
Group proftpd

DefaultServer on
Port 21
Umask 022
MaxInstances 30

<Directory />
  AllowOverwrite on
</Directory>
AllowForeignAddress on
MaxClientsPerHost 2 "Nicht mehr als %m Verbindungen"
MaxClients 8 "Leider sind schon %m Clients verbunden"
MaxLoginAttempts 3
AllowStoreRestart on
AllowRetrieveRestart on
DefaultRoot ~
RequireValidShell off

DebugLevel 5
SystemLog /var/log/proftpd.system.log
ServerLog /var/log/proftpd.server.log
TransferLog /var/log/proftpd.transfer.log

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.access.log WRITE,READ write
ExtendedLog /var/log/proftpd.auth.log AUTH auth
ExtendedLog /var/log/proftpd.paranoid.log ALL default

AuthOrder mod_sql_mysql.c

SQLAuthTypes Plaintext
SQLAuthenticate users
SQLConnectInfo ptx_main_account_db @localhost xxxxxx xxxxxx
SQLDefaultGID 65534
SQLDefaultUID 65534
SQLMinUserGID 100
SQLMinUserUID 500
SQLUserInfo ptx_ftp_users username password uid gid homedir shell

SQLLog PASS counter
SQLNamedQuery counter UPDATE "letzter_zugriff=now(), count=count+1 WHERE username='%u'" users

SQLLog RETR,STOR transfer1
SQLNamedQuery transfer1 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T',now(), 'c', NULL" xfer_stat

SQLLog ERR_RETR,ERR_STOR transfer2

SQLNamedQuery transfer2 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T',now(), 'i', NULL" xfer_stat


Habe gelesen, dass Signal 11 ein Segmentation Fault ist. An der Hardware kann es denke ich nicht liegen, da der Server ohne mod_sql_mysql einwandfrei funktioniert.

Der Server ist mit folgendem Befehl übersetzt worden
Code:

./configure \
    --prefix=/usr \
    --localstatedir=/var/run \
    --sysconfdir=/etc \
    --with-includes=/usr/include:/usr/local/include:/usr/local/mysql/include/mysql \
    --with-libraried=/usr/lib:/usr/local/lib:/usr/local/mysql/lib/mysql \
    --with-modules=mod_sql:mod_sql_mysql \
    --disable-auth-file \
    --disable-auth-pam


Ich weiß nichtmehr weiter, sitze schon 3 Tage an dem Teil. Kann mir jemand helfen?

Vielen Dank schonmal

Gruß,
Christoph
Gespeichert
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #1 am: 26. Oktober 2004, 15:59:06 »

Mach mal das SQLLogfile an und gucke rein.
Gespeichert

RedHat 8.0 (2.4er Kernel)
proftpd 1.2.10
-mod_sql_mysql
-mow_wrap
-mod_exec
-mod_ifsession[/size]
Christoph
ProFTPD
*
Offline Offline

Beiträge: 6


Profil anzeigen
« Antwort #2 am: 27. Oktober 2004, 13:27:06 »

Daraus werde ich irgendwie auch nicht richtig schlau. Er gibt ja keine Fehlermeldung o.ä. aus. Er hört einfach auf.

im mysql log steht auch nicht, dass er versucht zuzugreifen

Code:

Oct 26 12:48:58 mod_sql/4.11[29167]: backend api    'mod_sql_api_v1'
Oct 26 12:48:58 mod_sql/4.11[29167]: >>> sql_getconf
Oct 26 12:48:58 mod_sql/4.11[29167]: entering   mysql cmd_defineconnection
Oct 26 12:48:58 mod_sql/4.11[29167]:  name: 'default'
Oct 26 12:48:58 mod_sql/4.11[29167]:  user: 'root'
Oct 26 12:48:58 mod_sql/4.11[29167]:  host: 'localhost'
Oct 26 12:48:58 mod_sql/4.11[29167]:    db: 'ptx_main_account_db'
Oct 26 12:48:58 mod_sql/4.11[29167]:  port: '3306'
Oct 26 12:48:58 mod_sql/4.11[29167]:   ttl: '0'
Oct 26 12:48:58 mod_sql/4.11[29167]: exiting    mysql cmd_defineconnection
Oct 26 12:48:58 mod_sql/4.11[29167]: entering   mysql cmd_open
Gespeichert
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #3 am: 27. Oktober 2004, 13:39:54 »

Ist nicht zufällig Debian, oder? :roll:
Gespeichert

RedHat 8.0 (2.4er Kernel)
proftpd 1.2.10
-mod_sql_mysql
-mow_wrap
-mod_exec
-mod_ifsession[/size]
Christoph
ProFTPD
*
Offline Offline

Beiträge: 6


Profil anzeigen
« Antwort #4 am: 27. Oktober 2004, 14:49:23 »

Woody Smiley

Wenn ich das ganze über apt-get installiere funktionierts einwandfrei .. aber ich bin gerade dabei ein packet zu bauen, was auf mehrere Server soll und deshalb kommen die "mitgelieferten" Pakete nicht wirklich in Frage.

Ist Debian so proftpd unfreundlich?
Gespeichert
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #5 am: 27. Oktober 2004, 18:18:11 »

Zitat von: "Christoph"
Ist Debian so proftpd unfreundlich?

Wie man es nimmt  :roll:
http://www.proftpd.de/forum2/viewtopic.php?t=1015&
Gespeichert

RedHat 8.0 (2.4er Kernel)
proftpd 1.2.10
-mod_sql_mysql
-mow_wrap
-mod_exec
-mod_ifsession[/size]
Christoph
ProFTPD
*
Offline Offline

Beiträge: 6


Profil anzeigen
« Antwort #6 am: 28. Oktober 2004, 12:07:55 »

Mmh der Patch bzw. Backport ist doch aber für RC1/RC3. Ist der "Bug" im aktuellen stable release denn noch nicht behoben worden?

EDIT:

Es funktioniert jetzt. Proftpd läuft.

/opt/www/logs/proftpd.sql.log
Code:
Oct 28 11:47:15 mod_sql/4.11[28909]: backend module 'mod_sql_mysql/4.04'
Oct 28 11:47:15 mod_sql/4.11[28909]: backend api    'mod_sql_api_v1'
Oct 28 11:47:15 mod_sql/4.11[28909]: >>> sql_getconf
Oct 28 11:47:15 mod_sql/4.11[28909]: entering   mysql cmd_defineconnection
Oct 28 11:47:15 mod_sql/4.11[28909]:  name: 'default'
Oct 28 11:47:15 mod_sql/4.11[28909]:  user: 'root'
Oct 28 11:47:15 mod_sql/4.11[28909]:  host: 'localhost'
Oct 28 11:47:15 mod_sql/4.11[28909]:    db: 'ptx_main_account_db'
Oct 28 11:47:15 mod_sql/4.11[28909]:  port: '3306'
Oct 28 11:47:15 mod_sql/4.11[28909]:   ttl: '0'
Oct 28 11:47:15 mod_sql/4.11[28909]: exiting    mysql cmd_defineconnection
Oct 28 11:47:15 mod_sql/4.11[28909]: entering   mysql cmd_open
Oct 28 11:47:15 mod_sql/4.11[28909]: connection 'default' opened
Oct 28 11:47:15 mod_sql/4.11[28909]: connection 'default' count is now 1
Oct 28 11:47:15 mod_sql/4.11[28909]: exiting    mysql cmd_open
Oct 28 11:47:15 mod_sql/4.11[28909]: backend successfully connected.
Oct 28 11:47:15 mod_sql/4.11[28909]: mod_sql status     : on
Oct 28 11:47:15 mod_sql/4.11[28909]: negative_cache     : off
Oct 28 11:47:15 mod_sql/4.11[28909]: authenticate       : users
Oct 28 11:47:15 mod_sql/4.11[28909]: usertable          : ptx_ftp_user
Oct 28 11:47:15 mod_sql/4.11[28909]: userid field       : username
Oct 28 11:47:15 mod_sql/4.11[28909]: password field     : password
Oct 28 11:47:15 mod_sql/4.11[28909]: uid field          : uid
Oct 28 11:47:15 mod_sql/4.11[28909]: gid field          : gid
Oct 28 11:47:15 mod_sql/4.11[28909]: homedir field      : homedir
Oct 28 11:47:15 mod_sql/4.11[28909]: shell field        : shell
Oct 28 11:47:15 mod_sql/4.11[28909]: homedirondemand    : false
Oct 28 11:47:15 mod_sql/4.11[28909]: SQLMinUserUID      : 500
Oct 28 11:47:15 mod_sql/4.11[28909]: SQLMinUserGID      : 100
Oct 28 11:47:15 mod_sql/4.11[28909]: <<< sql_getconf
Oct 28 11:47:18 mod_sql/4.11[28909]: >>> cmd_getpwnam
Oct 28 11:47:18 mod_sql/4.11[28909]: entering   mysql cmd_escapestring
Oct 28 11:47:18 mod_sql/4.11[28909]: exiting    mysql cmd_escapestring
Oct 28 11:47:18 mod_sql/4.11[28909]: cache miss for user 'christoph'
Oct 28 11:47:18 mod_sql/4.11[28909]: : entering         mysql cmd_select
Oct 28 11:47:18 mod_sql/4.11[28909]: entering   mysql cmd_open
Oct 28 11:47:18 mod_sql/4.11[28909]: connection 'default' count is now 2
Oct 28 11:47:18 mod_sql/4.11[28909]: exiting    mysql cmd_open
Oct 28 11:47:18 mod_sql/4.11[28909]: query "SELECT username, password, uid, gid, homedir, shell FROM ptx_ftp_user WHERE (username='christoph') LIMIT 1"
Oct 28 11:47:18 mod_sql/4.11[28909]: entering   mysql cmd_close
Oct 28 11:47:18 mod_sql/4.11[28909]: connection 'default' count is now 1
Oct 28 11:47:18 mod_sql/4.11[28909]: exiting    mysql cmd_close
Oct 28 11:47:18 mod_sql/4.11[28909]: exiting    mysql cmd_select
Oct 28 11:47:18 mod_sql/4.11[28909]: cache miss for user 'christoph'
Oct 28 11:47:18 mod_sql/4.11[28909]: user 'christoph' cached
Oct 28 11:47:18 mod_sql/4.11[28909]: + pwd.pw_name  : christoph
Oct 28 11:47:18 mod_sql/4.11[28909]: + pwd.pw_uid   : 4000
Oct 28 11:47:18 mod_sql/4.11[28909]: + pwd.pw_gid   : 4000
Oct 28 11:47:18 mod_sql/4.11[28909]: + pwd.pw_dir   : /opt/www/htdocs
Oct 28 11:47:18 mod_sql/4.11[28909]: + pwd.pw_shell : /sbin/nologin
Oct 28 11:47:18 mod_sql/4.11[28909]: <<< cmd_getpwnam
Oct 28 11:47:18 mod_sql/4.11[28909]: >>> cmd_auth
Oct 28 11:47:18 mod_sql/4.11[28909]: entering   mysql cmd_escapestring
Oct 28 11:47:18 mod_sql/4.11[28909]: exiting    mysql cmd_escapestring
Oct 28 11:47:18 mod_sql/4.11[28909]: cache hit for user 'christoph'
Oct 28 11:47:18 mod_sql/4.11[28909]: >>> cmd_check
Oct 28 11:47:18 mod_sql/4.11[28909]: checking auth_type Plaintext
Oct 28 11:47:18 mod_sql/4.11[28909]: 'Plaintext' auth handler reports success
Oct 28 11:47:18 mod_sql/4.11[28909]: cache hit for user 'christoph'
Oct 28 11:47:18 mod_sql/4.11[28909]: <<< cmd_check
Oct 28 11:47:18 mod_sql/4.11[28909]: <<< cmd_auth


>ftp localhost
Code:

Connected to localhost.
220 ProFTPD 1.2.10 Server (ProFTPD Default Installation) [127.0.0.1]
Name (localhost:christoph):
331 Password required for christoph.
Password:
530 Login incorrect.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.


Mal sehen, was das jetzt wieder is

EDIT:

Funktioniert jetzt. Lag daran, dass /sbin/nologin nicht existierte bzw. /bin/false nicht als valide shell eingetragen war.

RequireValidShell off hätte es zwar auch getan, aber so find ichs schöner.
Gespeichert
Seiten: [1]   Nach oben
  Drucken  
 
Gehe zu:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Prüfe XHTML 1.0 Prüfe CSS
Seite erstellt in 0.061 Sekunden mit 16 Zugriffen.