Archiv verlassen und diese Seite im Standarddesign anzeigen : User nur FTP Zugriff geben.
Headshot1108
27.02.08, 12:48
Hallo,
Ich wollte fragen, wie man einen User nur FTP Zugriff geben kann.
Ich habe schon vim /etc/passwd
und user:x:1002:1002:,,,:/home/user:/bin/false
gemacht, aber dann konnte er nirgends mehr rein.
Achja, ich hab auch in vim /etc/shells
auch /bin/false hinzugefügt.
Freue mich auf Antworten!
MfG
corresponder
27.02.08, 12:53
leg eine leere datei an:
z.b. /etc/ftponly
dann gibst du diese in /etc/shells an
dann in der passwd eintragen und gut
gruss
c.
Headshot1108
27.02.08, 12:59
Hi,
Danke für die schnelle Antwort.
Doch es gibt leider keine änderung,
also es ist genau so wenn ich jetzt /bin/false mache.
MfG
Headshot
corresponder
27.02.08, 13:07
test:x:1001:1001:,,,:/var/www/:/etc/ftponly
z.b. wenn der user in der passwd test ist.
gruss
c.
HirschHeisseIch
27.02.08, 13:19
Läuft das denn überhaupt, wenn der User als shell z.B. /bin/bash hat?
Wenn nicht, liegt das Problem nämlich ganz wo anders. ;)
Headshot1108
27.02.08, 13:25
Jap, mit bash läuft es!
MfG
Headshot
Um welchen FTP-Server geht es denn überhaupt?
Headshot1108
27.02.08, 13:57
Oh,
Ich habe ein komisches Problem,
und zwar auch wenn /bin/bash aktiv ist,
kann ich nur zu SFTP rein nicht zum FTP
also nur in den Port 22 nicht 21.
MfG
Headshot
Ich habe ein komisches Problem,
Wieso komisch? Die beiden Sachen haben erstmal so nichts mit einander zu tun...
Also mir fallen da auf Anhieb 2 mögliche Fehlerquellen ein.
Entweder ist der FTP-Daemon nicht gestartet
oder
eine Firewall sperrt dich aus.
Gruß
Thomas
Edit:
FTP und SFTP sind zwei völlig unterschidliche Paar Schuhe, deshalb auch bei dem Einen Port 21 und bei dem Anderen Port 22.
Headshot1108
27.02.08, 14:41
OK,
Ich hatte ProFTPD nicht drauf, also konnte ich mich nicht per FTP einloggen.
Aber eine Frage habe ich noch,
Ich will das die User nur ihr Homeverzeichnis sehen,
nicht von anderen die Verzeichnisse.
MfG
Headshot
http://www.google.de/search?q=proftp+chroot&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:de:official&client=firefox-a
mfg
cane
Headshot1108
27.02.08, 23:38
Hi,
So ich hab es zwar geschafft, aber ich glaube nicht richtig.
Bei mir können die User immer noch in anderen Verzeichnissen sein,
obwohl sie die Gruppe ftpuser sind.
Bitte Hilfe!
MfG
Headshot
Nach welcher Anleitung bist Du vorgegangen?
Wo genau ist das Problem?
Was hast Du an den Configs geändert?
mfg
cane
Headshot1108
28.02.08, 00:08
Guten Abend,
Nach welcher Anleitung bist Du vorgegangen?
Nach dieser hier: http://archiv.debianhowto.de/de/proftpd/c_proftpd.html
Wo genau ist das Problem?
Das Problem ist, das die User trozdem noch in allen Verzeichnissen können.
Was hast Du an den Configs geändert?
Ich habe diese Config von der Anleitung genommen:
# 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 "meinserver"
ServerType inetd
DeferWelcome off
ShowSymlinks on
MultilineRFC2228 on
DefaultServer on
AllowOverwrite on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
DisplayLogin welcome.msg
DisplayFirstChdir .message
LsDefaultOptions "-l"
DenyFilter \*.*/
# Uncomment this if you are using NIS or LDAP to retrieve passwords:
#PersistentPasswd off
# 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
# Set the user and group that the server normally runs at.
User nobody
Group nogroup
# Normally, we want files to be overwriteable.
<Directory /*>
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
AllowOverwrite on
</Directory>
# Hier meine Ergänzungen
# chroot für alle User der Gruppe ftpuser
DefaultRoot ~ ftpuser
# Login nur von Mitgliedern der Gruppe ftpuser erlauben
<Limit LOGIN>
DenyGroup !ftpuser
</Limit>
# Root-Login verbieten und gültige Shell verlangen (in /etc/shells)
<Global>
RootLogin off
RequireValidShell on
</Global>
# Speed erhoehen
UseReverseDNS off
IdentLookups off
# Logging Formate
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"
# Logging aktivieren
# alle logins
ExtendedLog /var/log/ftp_auth.log AUTH auth
# file/dir Zugriff
ExtendedLog /var/log/ftp_access.log WRITE,READ write
# für paranoide (vorsicht, erzeugt grosse Logfiles)
#ExtendedLog /var/log/ftp_paranoid.log ALL default
Hoffe du/ihr könnt mir helfen.
MfG
Headshot
Natural Joe
28.02.08, 08:06
Hi Headshot,
die User kannst du mit
DefaultRoot ~
in ihr userdirectory binden, wie du es eh gemacht hast. Daher würde ich raten, dass du den server daemon nicht neu gestartet hast. Wenn du nicht xinetd als super-server verwendest, musst du den ProFTP server neu starten, bei Ubuntu zB mit "sudo /etc/init.d/proftpd restart". Jedes Mal wenn du die config datei änderst musst du das machen. Zusätzlich würde ich mir die log files anschauen (/var/log/ftp*), die sind manchmal sehr hilfreich.
Und wenn dein System direkt im Internet steht, würde ich vielleicht vsftp (very secure ftp) verwenden und nicht proftp. Soll im allgemeinen sicherer sein.
lg,
Jow
Headshot1108
28.02.08, 11:05
Hallo,
Danke für die Antwort, und ja ich habe gerade rausgefunden das ich xinetd
habe. Und ich wollte fragen, wie man bei xinetd einstellt, das User nur in ihr Homeverzeichnis können. Habe den FTP Server restartet, doch sie können immer noch in andere Verzeichnisse.
MfG
Headshot
corresponder
28.02.08, 12:00
dann zeig nochmal deine, hoffentlich angepasste, proftpd config
gruss
c.
Headshot1108
28.02.08, 12:10
# 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 "meinserver"
ServerType inetd
DeferWelcome off
ShowSymlinks on
MultilineRFC2228 on
DefaultServer on
AllowOverwrite on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
DisplayLogin welcome.msg
DisplayFirstChdir .message
LsDefaultOptions "-l"
DenyFilter \*.*/
# Uncomment this if you are using NIS or LDAP to retrieve passwords:
#PersistentPasswd off
# 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
# Set the user and group that the server normally runs at.
User nobody
Group nogroup
# Normally, we want files to be overwriteable.
<Directory /*>
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
AllowOverwrite on
</Directory>
# Hier meine Ergänzungen
# chroot für alle User der Gruppe ftpuser
DefaultRoot ~ ftpuser
# Login nur von Mitgliedern der Gruppe ftpuser erlauben
<Limit LOGIN>
DenyGroup !ftpuser
</Limit>
# Root-Login verbieten und gültige Shell verlangen (in /etc/shells)
<Global>
RootLogin off
RequireValidShell on
</Global>
# Speed erhoehen
UseReverseDNS off
IdentLookups off
# Logging Formate
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"
# Logging aktivieren
# alle logins
ExtendedLog /var/log/ftp_auth.log AUTH auth
# file/dir Zugriff
ExtendedLog /var/log/ftp_access.log WRITE,READ write
# für paranoide (vorsicht, erzeugt grosse Logfiles)
#ExtendedLog /var/log/ftp_paranoid.log ALL default
corresponder
28.02.08, 12:32
# chroot für alle User der Gruppe ftpuser
DefaultRoot ~ ftpuser
einfach ändern in:
DefaultRoot ~
gruss
c.
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.