Ordner über Ftp für einen User bereitstellen, aber wie???

Alles, was den ProFTPD betrifft, kann hier besprochen werden.

Ordner über Ftp für einen User bereitstellen, aber wie???

Postby Fallen Knight » 14. October 2007 13:17

Hey,
also ich benutze das neue Opensuse 10.3 und bin mit Linux relativ vertraut...
Mein Problem das ich habe ist folgendes, ich habe einen User angelegt und in der proftpd.conf eingetragen, läuft auch alles super.
Nur wenn ich von einem anderen Computer über Filezilla auf meinen Server zugreife, kann ich mir aber nicht nur meinen Ordner anschaune sondern auch auf ... klicken und so in den nächst höheren Ordner wechseln.
Meine Frage ist nun, ist es möglich zu verhindern das er die höheren Ordner anschaut??

Bsp.: ...\htdocs\Benutzer\Nils
Nils soll sich nur in seinem Ordner oder "tiefer" bewegen können, d.h.
...\htdocs\Benutzer\Nils\Bilder
jedoch nicht "höher".

Schon mal vielen Dank im Vorraus :)
Fallen Knight
 
Posts: 5
Joined: 14. October 2007 13:06

Hier noch der Quellcode

Postby Fallen Knight » 14. October 2007 13:19

Hier noch der Quellcode:

# 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 "ProFTPD"
ServerType standalone
DefaultServer on

UseReverseDNS off
IdentLookups off

# 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 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
User nils
#Group nogroup

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

# only for the web servers content
DefaultRoot /opt/lampp/htdocs

# nobody gets the password "lampp"
# commented out by lampp security
#UserPassword nobody wRPBu8u4YP0CY
UserPassword nobody fCki7rMWV4wrQ
UserPassword nils fCki7rMWV4wrQ

# nobody is no normal user so we have to allow users with no real shell
RequireValidShell off

# nobody may be in /etc/ftpusers so we also have to ignore this file
UseFtpUsers off
Fallen Knight
 
Posts: 5
Joined: 14. October 2007 13:06

Postby glitzi85 » 16. October 2007 21:21

Hallo,

du suchst nach chroot. Einfach lässt sich das mit DefaultRoot ~ machen. Dazu müsste allerdings dein Homeverzeichnis auf dein htdocs-Verzeichnis zeigen.

Alternativ schau mal bei proftpd.de nach, da gibt es IIRC gute chroot-Anleitungen.

mfg glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim


Return to ProFTPD

Who is online

Users browsing this forum: No registered users and 32 guests