www.ProFTPD.de

ProFTPD => ProFTPD - Deutsch => Thema gestartet von: tc_charly am 11. März 2007, 20:16:17



Titel: ProFTP und Zugriffe für gruppen
Beitrag von: tc_charly am 11. März 2007, 20:16:17
HiHo

Also mein server läuft, nur habe ich da eine frage ob und wie das geht :

Ich möchte einer grupper XXX das recht geben 5 mal auf den server zu zu greifen

Wenn nun 5 connects da sind möchte ich als Serverbetreiber aber weiterhin zugang haben, also das mit einem Loginnamen ZZZ das max connect übergangen werden kann.

Geht sowas und wenn ja wäre es genial wenn mir wer sagen könnte wie ;)

Schönen Sonntag noch ....

tc_charly


Titel: Re: ProFTP und Zugriffe für gruppen
Beitrag von: VolGas am 12. März 2007, 12:28:16
HiHo !?

Dir stehen als Begrenzung die folgenden Direktiven zur Verfügung:

  • ->MaxClients (http://www.proftpd.de/Direktiven.54.0.html#98)
  • ->MaxClientsPerHost (http://www.proftpd.de/Direktiven.54.0.html#99)
  • ->MaxHostsPerUser (http://www.proftpd.de/Direktiven.54.0.html#100)
  • ->MaxInstances (http://www.proftpd.de/Direktiven.54.0.html#101)
  • ->MaxLoginAttempts (http://www.proftpd.de/Direktiven.54.0.html#102)
  • ->MaxClientsPerUser (http://www.proftpd.de/Direktiven.54.0.html#331)
  • ->MaxClientsPerClass (http://www.proftpd.de/Direktiven.54.0.html#378)

Dies sind die Mittel, die Dir zur Verfügung stehen - und das ist nicht wenig.
Wenn Du Deine Gruppe irgendwie als "Class" definieren kannst (z.B. gemeinsamer IP-Netz),
dann ist es möglich über das Modul "mod_ifsession" diesen Bereich separat zu händeln.

Ich vermute mal, daß Du nicht hinbekommen wirst, was Du vor hast.

mfg.
  VolGas


Titel: Re: ProFTP und Zugriffe für gruppen
Beitrag von: tc_charly am 12. März 2007, 19:13:06
Erst einmal danke für deine Antwort ;)

Also du schreibst das du vermutest das ich nicht hin bekomme was ich vor habe :(

Im grunde möchte ich ja einer gruppe XXX max 5 zugänge geben, jedoch sollen alle anderen unbetastet bleiben.

Geht das denn nicht ?


Titel: Re: ProFTP und Zugriffe für gruppen
Beitrag von: VolGas am 13. März 2007, 07:03:03
Ich muß mich revidieren: es könnte doch eine Möglichkeit geben: wenn Du den ProFTPD mit dem
Modul "mod_ifsession" als letztes Modul compilierst, könnte dieses Konstrukt vielleicht funktionieren:
   <IfGroup party>
      MaxClients 5 "Die Party ist komplett - Du kommst hier nicht rein!"
   </IfGroup>

   <IfGroup !party>
      MaxClients none
   </IfGroup>
Der erste Anweisungsblock beschränkt die Gruppe "party" auf fünf User und lehnt jeden weiteren mit der optionalen
Meldung ab. Der zweite Block bezieht sich durch das Ausrufezeichen vor dem Gruppennamen auf alle anderen User.
Von diesen können sich dann noch bis "MaxInstances" erreicht ist, einloggen. Den zweiten Block könnte man wahr-
scheinlich weglassen, er steht da nur der Vollständigkeit halber...

Ich empfehle Dir, die Doku des Entwicklers zu dem Modul ->mod_ifsession (http://www.castaglia.org/proftpd/modules/mod_ifsession.html) durchzulesen, dann siehst Du klarer.

mfg.
  VolGas


Titel: Re: ProFTP und Zugriffe für gruppen
Beitrag von: tc_charly am 13. März 2007, 10:29:18
Ok Cool, hab mir das mal durch gelesen.

Doch irgendwie finde ich die mod_ifsession.c niergends zum downloaden :(

Und vor allem wo muss die dann rein ? UNd dann was machen ?

Sry aber mit dem hatte ich mich noch nie auseinander gesetzt, da ich das bisher noch nie ändern musste ;)

Danke schon mal für deine mega hilfe ;)


Titel: Re: ProFTP und Zugriffe für gruppen
Beitrag von: VolGas am 13. März 2007, 13:18:07
Das Modul "mod_ifsession" ist in den aktuellen ProFTPD-Sourcen enthalten und kann als Compile-Option
bei "configure" angegeben werden. Steht doch aber auch in der Doku:

Zitat
This module is contained in the mod_ifsession.c file for ProFTPD 1.2, and is not compiled by default.
Installation instructions are discussed here (http://www.castaglia.org/proftpd/modules/mod_ifsession.html#Installation).

Ein Posting mit Beispiel zum Compilieren des ProFTPD kannst Du auch ->hier (http://www.proftpd.de/forum/index.php/topic,2262.msg10578.html#msg10578) im Forum finden,
kurze Erklärungen zu den dort genutzten Optionen: ->hier (http://www.proftpd.de/forum/index.php/topic,2185.msg10312.html#msg10312).

Du müßtest bei dem Beispiel nur noch ein ":mod_ifsession" ganz an das Ende der "--with-modules"-Option setzen.

Vielleicht gibt es aber auch das ein oder andere RPM-Paket (oder ähnliches) des ProFTPD, das dieses Modul
schon beinhaltet. Ob Dein ProFTPD das Modul vielleicht schon hat, kannst Du nachprüfen, indem Du ihn mit
dem Parameter "-l" (kleines "L") startest, also z.B. so (Pfad anpassen!): /usr/local/sbin/proftpd -l

Wie man ein Softwarepaket compiliert ist allerdings nicht Gegenstand dieses Forums - ich bitte daher dies-
bezüglich gleich von Fragen oder gar Diskussionen hier im Forum abzusehen. Das Thema ist zu komplex -
irgendwo muß man eine Grenze ziehen, sonst schreibt man sich nur die Finger an Fragen wund, die anderweitig
schon zig-tausend fach beantwortet wurden und immer nur weitere neue Fragen nach sich ziehen. Sorry...

mfg.
  VolGas


Titel: Re: ProFTP und Zugriffe für gruppen
Beitrag von: tc_charly am 13. März 2007, 13:48:40
WoW Danke mal für deine Hilfe ;) Echt cool von dir.

Code:
#
# /etc/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#

ServerName "Spacerunner FTP"
ServerType standalone
DeferWelcome on

MultilineRFC2228 on
DefaultServer on
ShowSymlinks on

TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200

DisplayLogin                    welcome.msg
DisplayFirstChdir               .message
ListOptions                "-l"
IdentLookups                    off
#DenyFilter *.*/

# Uncomment this if you are using NIS or LDAP to retrieve passwords:
#PersistentPasswd off

# Uncomment this if you would use TLS module:
#TLSEngine on

# Uncomment this if you would use quota module:
#Quotas on

# Uncomment this if you would use ratio module:
#Ratios on

# Port 21 is the standard FTP port.
Port 21

# 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
MaxClientsPerUser               10

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

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022  022
# Normally, we want files to be overwriteable.
AllowOverwrite on

# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default.
#DelayEngine off

# Logging options
TransferLog          /var/log/xferlog

# Users needs a valid shell
RequireValidShell               no

DefaultRoot ~/
<Directory /*>
  AllowOverwrite                on
  HiddenStor                    off
</Directory>

<IfGroup Spaceleechers>
      MaxClients 2 "Die Party ist komplett - Du kommst hier nicht rein!"
   </IfGroup>

   <IfGroup !Spaceleechers>
      MaxClients none
   </IfGroup>

<Global>
AllowForeignAddress on
AllowOverwrite on
AllowRetrieveRestart on
AllowStoreRestart on
ServerIdent on "FTP SERVER"
DefaultChdir ~/
UseFtpUsers on
</Global>
UseReverseDNS off

# A basic anonymous configuration, no upload directories.

# <Anonymous ~ftp>
#   User ftp
#   Group nogroup
#   # We want clients to be able to login with "anonymous" as well as "ftp"
#   UserAlias anonymous ftp
#   # Cosmetic changes, all files belongs to ftp user
#   DirFakeUser on ftp
#   DirFakeGroup on ftp
#
#   RequireValidShell off
#
#   # Limit the maximum number of anonymous logins
#   MaxClients 10
#
#   # We want 'welcome.msg' displayed ogin, and '.message' displayed
#   # in each newly chdired directory.
#   DisplayLogin welcome.msg
#   DisplayFirstChdir .message
#
#   # Limit WRITE everywhere in the anonymous chroot
#   <Directory *>
#     <Limit WRITE>
#       DenyAll
#     </Limit>
#   </Directory>
#
#   # Uncomment this if you're brave.
#   # <Directory incoming>
#   #   # Umask 022 is a good standard umask  new files and dirs
#   #   # (second parm) from being group and world writable.
#   #   Umask 022  022
#   #            <Limit READ WRITE>
#   #            DenyAll
#   #            </Limit>
#   #            <Limit STOR>
#   #            AllowAll
#   #            </Limit>
#   # </Directory>
#
# </Anonymous>

Habe es mal rein, starten tut er, das kein ding, nur greift das ganze irgendwie nicht.

Also ich kann mit dem login mehr als 2 mal zu greifen :(

MAch ich da was falsch ?


Titel: Re: ProFTP und Zugriffe für gruppen
Beitrag von: tc_charly am 13. März 2007, 14:00:24
Ach ja :

Code:
h1158215:~# proftpd -vv
 - ProFTPD Version: 1.2.10 (stable)
 -   Scoreboard Version: 01040002
 -   Built: do mrt 22 18:28:32 CET 2001
 -     Module: mod_core.c
 -     Module: mod_xfer.c
 -     Module: mod_auth_unix.c
 -     Module: mod_auth_file.c
 -     Module: mod_auth.c
 -     Module: mod_ls.c
 -     Module: mod_log.c
 -     Module: mod_site.c
 -     Module: mod_auth_pam.c
 -     Module: mod_quotatab.c
 -     Module: mod_ratio.c
 -     Module: mod_tls.c
 -     Module: mod_rewrite.c
 -     Module: mod_radius.c
 -     Module: mod_wrap.c
 -     Module: mod_quotatab_file.c
 -     Module: mod_delay/0.4
 -     Module: mod_readme.c
 -     Module: mod_ifsession.c
 -     Module: mod_cap/1.0

Sollte ja laufen ;)