www.ProFTPD.de
13. März 2007, 18:52:18 *
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] 2   Nach unten
  Drucken  
Autor Thema: Probleme mit DefaultRoot  (Gelesen 928 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
200PulsMan
ProFTPD
*
Offline Offline

Beiträge: 8


Profil anzeigen
« am: 09. Juni 2004, 10:36:05 »

Hallo zusammen,

um es gleich vorweg zu sagen: Ja! Ich habe die Doku gelesen und die Suchfunktion im Forum benutzt. :-)

Trotzdem habe ich ein Problem mit DefaultRoot. Mein ProFTPD (1.2.9) ignoriert die DefaultRoot Anweisung. Der User wird zwar nach dem Verbinden in sein Verzeichnis geleitet, kann aber aus diesem bis in die Hauptebene heraus. Die Rechte habe ich auch geprüft. Habe ich vielleicht beim kompilieren etwas vergessen?? Irgendein Modul oder sowas?? Ich habe den ProFTPD im Debug-Modus gestartet (also -n -d9), daraus konnte ich aber auch keinen Fehler ablesen.

Danke für Eure Hilfe

Hier noch die Debug-Ausgabe:
 - parsing '/usr/local/etc/proftpd.conf' configuration
 - FS: using system open()
 - FS: using system read()
 - FS: using system read()
 - dispatching auth request "getpwnam" to module mod_auth_file
 - dispatching auth request "getpwnam" to module mod_auth_unix
 - dispatching auth request "getgrnam" to module mod_auth_file
 - dispatching auth request "getgrnam" to module mod_auth_unix
 - <Directory /*>: adding section for resolved path '/*'
 - FS: using system read()
 - <Directory /*>: adding section for resolved path '/*'
 - FS: using system read()
 - FS: using system read()
 - FS: using system read()
 - FS: using system read()
 - FS: using system read()
 - FS: using system close()
sub.domain.net -
sub.domain.net - Config for FTP-Server:
sub.domain.net - /*
sub.domain.net -  AllowOverwrite
sub.domain.net -  Umask
sub.domain.net -  AllowForeignAddress
sub.domain.net -  AllowRetrieveRestart
sub.domain.net -  RequireValidShell
sub.domain.net -  MaxClients
sub.domain.net -  MaxClientsPerHost
sub.domain.net -  DefaultChdir
sub.domain.net - DefaultServer
sub.domain.net - Umask
sub.domain.net - TimeoutIdle
sub.domain.net - TimeoutStalled
sub.domain.net - AllowForeignAddress
sub.domain.net - AllowRetrieveRestart
sub.domain.net - IdentLookups
sub.domain.net - RequireValidShell
sub.domain.net - MaxClients
sub.domain.net - MaxClientsPerHost
sub.domain.net - MaxLoginAttempts
sub.domain.net - DefaultChdir
sub.domain.net - DefaultRoot
sub.domain.net - UserID
sub.domain.net - UserName
sub.domain.net - GroupID
sub.domain.net - GroupName
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net - DefaultRoot
sub.domain.net -
sub.domain.net - Config for domain.net Anonymous FTP-Service:
sub.domain.net - /data/www/domain.net/pub/
sub.domain.net -  /*
sub.domain.net -   Limit
sub.domain.net -    DenyAll
sub.domain.net -   MaxClients
sub.domain.net -   AllowOverwrite
sub.domain.net -   RequireValidShell
sub.domain.net -   TransferLog
sub.domain.net -  UserName
sub.domain.net -  GroupName
sub.domain.net -  UserAlias
sub.domain.net -  MaxClients
sub.domain.net -  AllowOverwrite
sub.domain.net -  RequireValidShell
sub.domain.net -  TransferLog
sub.domain.net - AllowOverwrite
sub.domain.net - RequireValidShell
sub.domain.net - TransferLog
sub.domain.net - ExtendedLog
sub.domain.net - dispatching auth request "getgroups" to module mod_auth_file
sub.domain.net - dispatching auth request "getgroups" to module mod_auth_unix
sub.domain.net - SETUP PRIVS at main.c:2704
sub.domain.net - ROOT PRIVS at main.c:1956
sub.domain.net - RELINQUISH PRIVS at main.c:1962
sub.domain.net - ROOT PRIVS at main.c:2323
sub.domain.net - opening scoreboard '/var/run/proftpd.scoreboard'
sub.domain.net - RELINQUISH PRIVS at main.c:2347
sub.domain.net - ROOT PRIVS at inet.c:452
sub.domain.net - RELINQUISH PRIVS at inet.c:510
sub.domain.net - ProFTPD 1.2.9 (stable) (built Tue Jun 8 16:14:37 CEST 2004) standalone mode STARTUP
sub.domain.net - ROOT PRIVS at main.c:2171
sub.domain.net - RELINQUISH PRIVS at main.c:2177
sub.domain.net - FS: using system lstat()
Gespeichert
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #1 am: 09. Juni 2004, 10:48:56 »

:shock:  :shock:
Poste mal bitte die Konfigurationsdatei....
Gespeichert

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

Beiträge: 8


Profil anzeigen
« Antwort #2 am: 09. Juni 2004, 11:03:30 »

Voila!

Im Prinzip ist die DefaultRoot-Anweisung doppelt vorhanden, nämlich einmal in der Form DefautRoot ~ und dann noch mit Verzeichnisangabe und user. Es funktioniert aber weder das eine noch das andere.
----------------------------------------------------

## This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName         "FTP-Server"
ServerType         standalone
DefaultServer         on

# Port 21 is the standard FTP port.
Port            21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask            022

# To prevent DoS attacks, set the maximum number of child processes
# to 90.  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         90
TimeoutIdle         400
TimeoutStalled         400
AllowForeignAddress      off
AllowRetrieveRestart      on
UseReverseDNS         off
IdentLookups         off
SyslogFacility         local6
RequireValidShell      off

MaxClients         150
MaxClientsPerHost      10
MaxLoginAttempts      5

DefaultChdir ~/
DefaultRoot ~

# Path to pid file
ScoreboardFile                 /var/run/proftpd.scoreboard

# Set the user and group that the server normally runs at.
User            ftp
Group            ftp

# Normally, we want files to be overwriteable.
<Directory /*>
  AllowOverwrite      on
</Directory>

# A basic anonymous configuration, no upload directories.
#<Anonymous ~ftp>
#  User            ftp
#  Group         ftp
#  # We want clients to be able to login with "anonymous" as well as "ftp"
#  UserAlias         anonymous ftp
#
#  # Limit the maximum number of anonymous logins
#  MaxClients         10
#
#  # We want 'welcome.msg' displayed at login, and '.message' displayed
#  # in each newly chdired directory.
#  DisplayLogin         welcome.msg
#  DisplayFirstChdir      .message
#
#  # Limit WRITE everywhere in the anonymous chroot
#  <Limit WRITE>
#    DenyAll
#  </Limit>
#
#</Anonymous>

LogFormat awstats "%t %h %u %m %f %s %b"

<VirtualHost 192.168.248.102>
  ServerName "domain.net Anonymous FTP-Service"
  AllowOverwrite On
  RequireValidShell off
  TransferLog none
  ExtendedLog /var/log/xferlog-domain read,write awstats
  <Anonymous /data/www/domain.net/pub>
    User   ftp
    Group   ftp
    UserAlias   anonymous ftp
    MaxClients   20
    <Directory /*>
      <Limit WRITE>
        DenyAll
      </Limit>
    </Directory>
  </Anonymous>
</VirtualHost>

# ab hier einige DefaultRoot Anweisungen für ca. 50 User
DefaultRoot /data/www/domain.net username
DefaultRoot ..... usw.
Gespeichert
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #3 am: 09. Juni 2004, 11:07:10 »

Mystisch.
Als wer meldest du dich denn an?
Wo landet der User dann genau und was steht bei ihm in der passwd?

Geht es mit nur einem DefaultRoot ~ ?
Gespeichert

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

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #4 am: 09. Juni 2004, 11:14:10 »

Zitat von: "200PulsMan"
Voila!
# ab hier einige DefaultRoot Anweisungen für ca. 50 User
DefaultRoot /data/www/domain.net username
DefaultRoot ..... usw.


<huestel>
Wollen wir uns die Defaultroot Anleitung noch mal durchlesen ??  :)
</hustel>
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
stonki
Administrator
ProFTPD
*****
Offline Offline

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #5 am: 09. Juni 2004, 11:15:14 »

Zitat von: "stonki"
Zitat von: "200PulsMan"
Voila!
# ab hier einige DefaultRoot Anweisungen für ca. 50 User
DefaultRoot /data/www/domain.net username
DefaultRoot ..... usw.


<huestel>
Wollen wir uns die Defaultroot Anleitung noch mal durchlesen ??  Smiley
</hustel>


mal davon abgesehen, dass alles was man mehr als 5x in der config hat irgendwie der falsche Weg ist. Wie gehen denn die normalen HomeDirs nicht ?

cu
stonki
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
200PulsMan
ProFTPD
*
Offline Offline

Beiträge: 8


Profil anzeigen
« Antwort #6 am: 09. Juni 2004, 11:19:26 »

nein.... nur mit einem defaultroot ~ geht es nicht. auch hier kann ich als irgendein user im system frei herumspazieren.

ich melde mich z.B. als ein eingetragende user an. Die user habe ich ich in folgender weise angelegt.

useradd -d /data/www/homedir.de -s /bin/false -g gruppe username

wenn ich mich dannn als username per FTP verbinde lande ich dann im verzeichnis /data/www/homedir.de. Allerdings kann ich dann auch in die verzeichnisse /data/www/einandershomedir.de rein und munter alles runterladen was ich will, obwohl das verzeichnis einem andern user und gruppe gehört... nur schreiben geht nicht.
Gespeichert
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #7 am: 09. Juni 2004, 11:20:25 »

Zitat von: "Der andere Chef hier"
Wollen wir uns die Defaultroot Anleitung noch mal durchlesen ?? Smiley

Die Anweisung basiert auf Guppen.  L&auml;chelnd  Zunge  Zunge

Zitat von: "200PulsMan"
nein.... nur mit einem defaultroot ~ geht es nicht.

Kann doch nicht sein :??
Gespeichert

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

Beiträge: 8


Profil anzeigen
« Antwort #8 am: 09. Juni 2004, 11:26:04 »

Das ist gewachsen mit der Zeit. Am Anfang waren es nur zwei oder drei DefaultRoots. Im Lauf der Zeit sind immer mehr hinzugekommen. Im Prinzip sind die DefaultRoot Anweisungen unnötig, wenn DefaultRoot ~ funktionieren würde. Aber das macht es eben nicht.  :oops:  :cry:
Gespeichert
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #9 am: 09. Juni 2004, 11:27:41 »

Zitat von: "200PulsMan"
wenn DefaultRoot ~ funktionieren würde. Aber das macht es eben nicht.  :oops:  :cry:

Klar. Man muß nur wollen.

Ich hab auch 200 Puls....



...bald  :lol:  :lol:

Los. Alles raus und EIN Defaultroot ~ rein und restart im Debug-Mode

Eine Frage noch:
Du meldest dich aber nicht da an, oder?
Code:
<VirtualHost 192.168.248.102>
Gespeichert

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

Beiträge: 1853


15318939
Profil anzeigen WWW E-Mail
« Antwort #10 am: 09. Juni 2004, 11:30:38 »

Zitat von: "200PulsMan"
Das ist gewachsen mit der Zeit. Am Anfang waren es nur zwei oder drei DefaultRoots. Im Lauf der Zeit sind immer mehr hinzugekommen. Im Prinzip sind die DefaultRoot Anweisungen unnötig, wenn DefaultRoot ~ funktionieren würde. Aber das macht es eben nicht.  :oops:  :cry:


ok, aber da es grundsaetzlich funktioniert, lass uns bitte mal Dein Problem loesen und keine haesslichen (und sogar in der syntax falschen) Loesungen basteln. Reduziert bitte Deine COnfig mal um die ganzen "defaultroot" zeilen bis auf "defaultroot ~", desweiteren fuege ausserdem einmal ein "defaultroot ~" in Deinen VirtualHost Block.

cu
stonki
Gespeichert

www.stonki.de:    the more I see, the more I know.......
www.proftpd.de:   Deutsche ProFTPD Dokumentation
www.krename.net:  Der Batch Renamer für KDE
www.kbarcode.net: Die Barcode Solution für KDE
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #11 am: 09. Juni 2004, 11:31:46 »

Zitat von: "stonki"
Zitat von: "200PulsMan"
Das ist gewachsen mit der Zeit. Am Anfang waren es nur zwei oder drei DefaultRoots. Im Lauf der Zeit sind immer mehr hinzugekommen. Im Prinzip sind die DefaultRoot Anweisungen unnötig, wenn DefaultRoot ~ funktionieren würde. Aber das macht es eben nicht.  :oops:  :cry:


ok, aber da es grundsaetzlich funktioniert, lass uns bitte mal Dein Problem loesen und keine haesslichen (und sogar in der syntax falschen) Loesungen basteln. Reduziert bitte Deine COnfig mal um die ganzen "defaultroot" zeilen bis auf "defaultroot ~", desweiteren fuege ausserdem einmal ein "defaultroot ~" in Deinen VirtualHost Block.

cu
stonki

Meine Rede  Cool
Gespeichert

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

Beiträge: 8


Profil anzeigen
« Antwort #12 am: 09. Juni 2004, 11:46:48 »

Jawohl! So habe ich es gemacht! Alles raus und nur eine DefaultRoot ~ Anweisung rein. Ebenfalls habe diese in den virtuellen Host rein.

Und siehe da! Es geht! Oh Mann... Was für eine Schande!!  :idiot)
Gespeichert
Wörsty
Moderator
ProFTPD
*****
Offline Offline

Beiträge: 1602


50772603
Profil anzeigen WWW E-Mail
« Antwort #13 am: 09. Juni 2004, 11:47:53 »

Ich nehm ne kleine Cola :ok)
Gespeichert

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

Beiträge: 8


Profil anzeigen
« Antwort #14 am: 09. Juni 2004, 11:54:00 »

bald reichen die 200 Puls nicht mehr! Danke für Eure Mühe und die Geduld mit mir!

Eines ist mir aber trotzdem nicht klar! Warum hat diese Config jahrelang funktioniert und dann aufeinmal nicht mehr?? Wie auch immer! Es ist einfach zu warm heute scheinbar!
Gespeichert
Seiten: [1] 2   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.074 Sekunden mit 16 Zugriffen.