Titel: Verbindung wird bei erfolgreicher Auth sofort geschlossen Beitrag von: Scrubb am 08. September 2004, 00:12:30 Ich bin bei proftpd ein ziemlicher Neuling, will aber gleich meine vorhandene mysql-DB zur Authentifizierung nutzen. Bin dem Howto gefolgt und hab mir auch die Anleitung gründlich durchgelesen, jedoch bricht der Server die Verbindung sofort nach Eingabe des richtigen Benutzernamen und -passworts die Verbindung ab. Auch in eurem Forum hab ich nicht wirklich was gefundenwas mein Problem beheben würde. Wäre schön wenn man mir mal kurz unter die Arme greifen könnte, falls ich (was wahrscheinlich ist) nen typischen Anfängerfehler gemacht habe oder was überlesen habe
MfG Scrubb Hier meine /etc/proftpd.conf # This is a basic ProFTPD configuration file. It establishes a single # server and a single anonymous login. It assumes that you have a # user/group "nobody"/"nogroup" for normal operation and anon. # !!! PLEASE read the documentation of proftpd !!! # # You can find the documentation in /usr/doc/packages/proftpd/, # http://www.proftpd.org/ and don't forget to read carefully # and _follow_ hints on http://www.proftpd.net/security.html. # ServerName "./ - localroot.de" ServerType standalone ServerAdmin support@localroot.de # # Debug Level # emerg, alert, crit (empfohlen), error, warn. notice, info, debug # #SyslogLevel emerg #SystemLog /var/log/proftpd.system.log # # uncomment, if you want to hide the servers name: # ServerIdent on "./ - localroot.de" DeferWelcome on DefaultServer on # # Display # #DisplayLogin /messages/ftp.motd #DisplayConnect /net/messages/ftp.pre #DisplayFirstChdir index.txt HiddenStor off DirFakeUser on DirFakeGroup on DirFakeMode 0000 RequireValidShell off # Enable PAM for authentication... # AuthPAM on # Setting this directive to on will cause authentication to fail # if PAM authentication fails. The default setting, off, allows # other modules and directives such as AuthUserFile and friends # to authenticate users. # # AuthPAMAuthoritative on # This directive allows you to specify the PAM service name used # in authentication (default is "proftpd" on SuSE Linux). # You have to setup the service in the /etc/pam.d/<other_name>. # #AuthPAMConfig <other_name> # Port 21 is the standard FTP port. Port 21 Authorder mod_sql.c #------------------------mysql Modul: 4.x # # Zugangskontrolle # SQLAuthTypes Plaintext SQLAuthenticate users* # Die $ hab ich jetzt nur eingefügt SQLConnectInfo $user@localhost $DB $Pw #SQLDefaultGID 65533 #SQLDefaultUID 65533 #SQLMinUserGID 100 #SQLMinUserUID 500 #SQLUserInfo ftp username password uid gid homedir shell SQLUserInfo users userid passwd uid gid homedir shell SQLGroupInfo groups groupname gid members SQLLOGFILE /var/log/proftpd.sql.log # # aktive SQL Kommandos, ab hier passiert etwas :-) # #SQLLog PASS counter #SQLNamedQuery counter UPDATE "letzter_zugriff=now(), count=count+1 WHERE username='%u'" ftp # xfer Log in mysql #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 #------------------------mysql # Port 21 is the standard FTP port. Port 21 # disable listen on 0.0.0.0:21 - the port (and IP) should # be specified explicitly in each VirtualHost definition # #Port 0 # listen for each (additional) address explicitly that is # specified (via Bind and Port) in a VirtualHost definition # #SocketBindTight on # # FXP Unterstuetzung # #AllowForeignAddress on # Umask 022 is a good standard umask to prevent new dirs # and files from being group and world writable. Umask 022 # Set the user and group that the server normally runs at. User nobody Group nogroup # Maximal Werte setzen MaxClientsPerHost 3 "Nicht mehr als %m Verbindungen" MaxClients 5 "Leider sind schon %m Clients verbunden" # RateReadBPS 5000 # RateReadFreeBytes 5000 # RateReadHardBPS on #Classes on #Class default limit 5 #Class internet limit 2 #Class local limit 3 #Class internet ip 0.0.0.0/0 #Class internet ip 192.168.99.99/24 #Class local ip 127.0.0.1/24 #Class local ip 192.168.0.0/24 # # Restart erlauben # #AllowStoreRestart on #AllowRetrieveRestart on # Normally, we want files to be overwriteable. <Directory ~> AllowOverwrite off HideNoAccess on <Limit READ> AllowAll </Limit> <Limit Write> DenyAll </Limit> </Directory> <Directory /net/incoming/*> AllowOverwrite on <Limit STOR CMD MKD WRITE> AllowALL </Limit> <Limit RETR DELE> DenyALL </Limit> </Directory> # It is a very good idea to allow only filenames containing normal # alphanumeric characters for uploads (and not shell code...) #PathAllowFilter "^[a-zA-Z0-9_.-]()'+$" #PathAllowFilter "^[a-zA-Z0-9 _.-]()'+$" # We don't want .ftpaccess or .htaccess files to be uploaded #PathDenyFilter "(\.ftp)|(\.ht)[a-z]+$" #PathDenyFilter "\.ftp[a-z]+$" # Do not allow to pass printf-Formats (security! see documentation!): #AllowFilter "^[a-zA-Z0-9@~ /,_.-]*$" #DenyFilter "%" # To prevent DoS attacks, set the maximum number of child processes # to 30. If you need to allow more than 30 concurrent connections # at once, simply increase this value. Note that this ONLY works # in standalone mode, in inetd mode you should use an inetd server # that allows you to limit maximum number of processes per service # such as xinetd) MaxInstances 30 # Performance: skip DNS resolution when we process the logs... UseReverseDNS on # Turn off Ident lookups IdentLookups on # Set the maximum number of seconds a data connection is allowed # to "stall" before being aborted. TimeoutStalled 300 # Where do we put the pid files? #ScoreboardPath /usr/local/var/proftpd # # Logging options # TransferLog /var/log/proftpd.xferlog # Some logging formats 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.access_log WRITE,READ write # Record all logins ExtendedLog /var/log/proftpd.auth_log AUTH auth # Paranoia logging level.... ExtendedLog /var/log/proftpd.paranoid_log ALL default # # Do a chroot for web-users (i.e. public or www group), but # do not change root if the user is also in the users group... # DefaultRoot ~ !users # # Limit login attempts # MaxLoginAttempts 3 # # Users needs a valid shell # RequireValidShell off /var/log/proftpd.paranoid.log localhost UNKNOWN nobody [07/Sep/2004:23:01:32 +0200] "USER 1" 331 - /var/log/proftpd.sql.log Sep 07 23:01:30 mod_sql/4.10[24674]: backend module 'mod_sql_mysql/4.04' Sep 07 23:01:30 mod_sql/4.10[24674]: backend api 'mod_sql_api_v1' Sep 07 23:01:30 mod_sql/4.10[24674]: >>> sql_getconf Sep 07 23:01:30 mod_sql/4.10[24674]: entering mysql cmd_defineconnection Sep 07 23:01:30 mod_sql/4.10[24674]: name: 'default' Sep 07 23:01:30 mod_sql/4.10[24674]: user: 'proftpd' Sep 07 23:01:30 mod_sql/4.10[24674]: host: 'localhost' Sep 07 23:01:30 mod_sql/4.10[24674]: db: 'proftpd' Sep 07 23:01:30 mod_sql/4.10[24674]: port: '3306' Sep 07 23:01:30 mod_sql/4.10[24674]: ttl: '0' Sep 07 23:01:30 mod_sql/4.10[24674]: exiting mysql cmd_defineconnection Sep 07 23:01:30 mod_sql/4.10[24674]: entering mysql cmd_open Sep 07 23:01:30 mod_sql/4.10[24674]: connection 'default' opened Sep 07 23:01:30 mod_sql/4.10[24674]: connection 'default' count is now 1 Sep 07 23:01:30 mod_sql/4.10[24674]: exiting mysql cmd_open Sep 07 23:01:30 mod_sql/4.10[24674]: backend successfully connected. Sep 07 23:01:30 mod_sql/4.10[24674]: mod_sql status : on Sep 07 23:01:30 mod_sql/4.10[24674]: negative_cache : off Sep 07 23:01:30 mod_sql/4.10[24674]: authenticate : users* Sep 07 23:01:30 mod_sql/4.10[24674]: usertable : users Sep 07 23:01:30 mod_sql/4.10[24674]: userid field : userid Sep 07 23:01:30 mod_sql/4.10[24674]: password field : passwd Sep 07 23:01:30 mod_sql/4.10[24674]: uid field : uid Sep 07 23:01:30 mod_sql/4.10[24674]: gid field : gid Sep 07 23:01:30 mod_sql/4.10[24674]: homedir field : homedir Sep 07 23:01:30 mod_sql/4.10[24674]: shell field : shell Sep 07 23:01:30 mod_sql/4.10[24674]: homedirondemand : false Sep 07 23:01:30 mod_sql/4.10[24674]: SQLMinUserUID : 999 Sep 07 23:01:30 mod_sql/4.10[24674]: SQLMinUserGID : 999 Sep 07 23:01:30 mod_sql/4.10[24674]: <<< sql_getconf Sep 07 23:01:34 mod_sql/4.10[24674]: >>> cmd_getpwnam Sep 07 23:01:34 mod_sql/4.10[24674]: entering mysql cmd_escapestring Sep 07 23:01:34 mod_sql/4.10[24674]: exiting mysql cmd_escapestring Sep 07 23:01:34 mod_sql/4.10[24674]: cache miss for user '1' Sep 07 23:01:34 mod_sql/4.10[24674]: : entering mysql cmd_select Sep 07 23:01:34 mod_sql/4.10[24674]: entering mysql cmd_open Sep 07 23:01:34 mod_sql/4.10[24674]: connection 'default' count is now 2 Sep 07 23:01:34 mod_sql/4.10[24674]: exiting mysql cmd_open Sep 07 23:01:34 mod_sql/4.10[24674]: query "SELECT userid, passwd, uid, gid, homedir, shell FROM users WHERE (userid='1') LIMIT 1" Sep 07 23:01:34 mod_sql/4.10[24674]: entering mysql cmd_close Sep 07 23:01:34 mod_sql/4.10[24674]: connection 'default' count is now 1 Sep 07 23:01:34 mod_sql/4.10[24674]: exiting mysql cmd_close Sep 07 23:01:34 mod_sql/4.10[24674]: exiting mysql cmd_select Sep 07 23:01:34 mod_sql/4.10[24674]: cache miss for user '1' Sep 07 23:01:34 mod_sql/4.10[24674]: user '1' cached Sep 07 23:01:34 mod_sql/4.10[24674]: + pwd.pw_name : 1 Sep 07 23:01:34 mod_sql/4.10[24674]: + pwd.pw_uid : 10000 Sep 07 23:01:34 mod_sql/4.10[24674]: + pwd.pw_gid : 65533 Sep 07 23:01:34 mod_sql/4.10[24674]: + pwd.pw_dir : /home/robin/ftp Sep 07 23:01:34 mod_sql/4.10[24674]: + pwd.pw_shell : /bin/bash Sep 07 23:01:34 mod_sql/4.10[24674]: <<< cmd_getpwnam Sep 07 23:01:34 mod_sql/4.10[24674]: >>> cmd_auth Sep 07 23:01:34 mod_sql/4.10[24674]: entering mysql cmd_escapestring Sep 07 23:01:34 mod_sql/4.10[24674]: exiting mysql cmd_escapestring Sep 07 23:01:34 mod_sql/4.10[24674]: cache hit for user '1' Sep 07 23:01:34 mod_sql/4.10[24674]: >>> cmd_check Sep 07 23:01:34 mod_sql/4.10[24674]: checking auth_type Plaintext Sep 07 23:01:34 mod_sql/4.10[24674]: 'Plaintext' auth handler reports success Sep 07 23:01:34 mod_sql/4.10[24674]: cache hit for user '1' Sep 07 23:01:34 mod_sql/4.10[24674]: <<< cmd_check Sep 07 23:01:34 mod_sql/4.10[24674]: <<< cmd_auth Sep 07 23:01:34 mod_sql/4.10[24674]: >>> cmd_getpwnam Sep 07 23:01:34 mod_sql/4.10[24674]: cache hit for user '1' Sep 07 23:01:34 mod_sql/4.10[24674]: <<< cmd_getpwnam Titel: Verbindung wird bei erfolgreicher Auth sofort geschlossen Beitrag von: stonki am 08. September 2004, 08:55:15 hmm, und nun noch mal Dein "normales" ProFTPD log (-nd5). Ich wette aber, es liegt an den Rechten...
cu stonki Titel: Verbindung wird bei erfolgreicher Auth sofort geschlossen Beitrag von: Scrubb am 09. September 2004, 00:05:51 Lag seltsamerweise daran, dass er keine Logdatei geführt hat die Einträge
SyslogLevel emerg SystemLog /var/log/proftpd.system.log waren jeweils auskommentiert. Danke für die Hilfe Scrubb |