Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ProFTP und VFAT-Partitionen
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Thu May 15, 2003 1:12 am    Post subject: ProFTP und VFAT-Partitionen Reply with quote

Hallo,
vielleicht bin ich nur zu blöd dafür, aber ich hab zu meinem Problem nirgends auch nur ansatzweise eine Lösung oder eine Anleitung gefunden. Vielleicht kann mir hier jemand helfen.

Ich hatte mir annodazumal unter Windoof einen FTP-Server installiert (genauergesagt BFTP). Das Tolle daran ist, daß man damit eine richtig schöne virtuelle Verzeichnisstruktur anlegen kann, die der über ftp eingeloggte User dann zu Gesicht bekommt. Festgelegt wurde das Ganze in einer Config-Datei, die sich im Windows-FTP-Home-Verzeichnis befindet. Das Ganze sieht dann so aus:

Upload | e:\FTP\UPLOAD
Stuff | e:\Stuff
Musik | d:\mp3
Movies | d:\Dokumente und Einstellungen\User\Eigene Dateien\Movies
Pix | D:\Dokumente und Einstellungen\User\Eigene Dateien\Eigene Bilder\wallpapers

Laufwerk d:\ ist NTFS, Laufwerk e:\ ist VFAT. Das Upload-Verzeichnis ist logischweise mit Schreibzugriff. Links steht der virtuelle Verzeichnisname, der im FTP sichtbar wird. Rechts daneben ist der tatsächliche Pfad auf der Platte, den der User aber nicht zu Gesicht bekommt.

Da ich mittlerweile Windoof nur noch im Notfall boote, hab ich ProFTP installiert. Allerdings bekomm ich das einfach nicht gebacken, die oben aufgeführte Verzeichnisstruktur irgendwie unter Linux zu realisieren. Das größte Problem dabei ist, daß ich als anonymous eingeloggt nicht mal aus /home/ftp rauskomm, da proftp mit dem <anonymous>-Tag gleichzeitig ein chroot() auf das ftp-Homeverzeichnis ansetzt.

Erreichen will ich einen Zugriff für jeden, der sich als "anonymous" einloggt, wie in der oben beschriebenen BFTP-Config-Datei.

Meine bisherige <anonymous>-Section in der proftpd.conf sieht folgendermaßen aus:

<Anonymous ~ftp>
User ftp
Group ftp

RequireValidShell off

# login mit "anonymous" ist genauso gültig wie "ftp"
UserAlias anonymous ftp

# die maximale anzahl von clienten wird auf 10 beschränkt
MaxClients 10 "Sorry, max %m anonymous users allowed. Try again later"

# es sind maximal 5 verbindungen pro ip-adresse gültig
MaxClientsPerHost 5 "Sorry, you may not connect more than %m time."

# der filetransfer wird hier aufgezeichnet
TransferLog /var/log/proftpd.pub.log

# bei login wird die datei welcome.msg angezeigt. sie muss sich im
# homeverzeichnis des benutzer ftp befinden
DisplayLogin welcome.msg

# bei einem wechsel in ein verzeichnis wird die datei .message angezeigt
DisplayFirstChdir .message

# sollte ein download vom client abgebrochen werden, kann man ihn wieder an
# der stelle aufnehmen, an der abgebrochen wurde
AllowStoreRestart on

# bei verzeichnissen sind nur buchstaben und zahlen erlaubt
PathAllowFilter ".*[a-zA-Z0-9]+$"

# AllowOverwrite: das überschreiben von dateien wird explizit deaktiviert
# HideNoAccess: dateien und verzeichnisse, für die der aktuelle benutzer
# keine zugriffsrechte besitzt, werden nicht angezeigt
# HideUser root: dateien des benutzer root werden nicht angezeigt
# IgnoreHidden: zugriff auf versteckte dateien und verzeichnisse wird verweigert
# DenyAll WRITE: schreiben wird überall verweigert
<Directory *>
AllowOverwrite off
HideNoAccess on
HideUser root
<Limit ALL>
#IgnoreHidden on
</Limit>
<Limit WRITE>
DenyAll
</Limit>
</Directory>

# im verzeichnis public ist anlegen, löschen von dateien und verzeichnissen
# erlaubt
<Directory incoming/*>
<Limit STOR WRITE>
AllowAll
</Limit>
</Directory>
</Anonymous>

Das incoming-Verzeichnis befindet sich in meinem /home/ftp/ . Hatte ich nur für Testzwecke mal angelegt.

Um auf die VFAT-Partitionen zugreifen zu können, hab ich schon versucht im /home/ftp-Verzeichnis Sym-Links anzulegen. Hat allerdings nichts gebracht. Konnte nicht auf die FAT-Partitionen wechseln.

Kann mir jemand ein paar Ideen liefern, wie ich die proftpd.conf zu modifizieren hab, um endlich auf die Windows-Partitionen per FTP-Anonymous zugreifen zu können und um irgendwie auch die virtuelle Verzeichnisstruktur realisieren zu können?

Gruß
Sven
Back to top
View user's profile Send private message
daemonb
Apprentice
Apprentice


Joined: 24 Jul 2002
Posts: 242

PostPosted: Thu May 15, 2003 6:14 am    Post subject: Reply with quote

mh ich bin mir da nicht sicher ob es an deiner proftp.conf liegt, ich würde sagen du hast in der fstab evtl kein umask drin. Kann das sein?
einfach in der fstab bei den optionen umask=000 einfügen, dass hat bei mir immer geklappt, dann kann jeder auf der platte rwx.
Hoffe das hilft weiter
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Thu May 15, 2003 9:13 pm    Post subject: Reply with quote

Nee, also am umask liegts nicht. Das hab ich schon gesetzt.
Back to top
View user's profile Send private message
easy2k
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2002
Posts: 129
Location: Östlichste Stadt Deutschlands

PostPosted: Fri May 16, 2003 5:28 am    Post subject: Reply with quote

Ich habe das gefunden vieleicht hilft es dir.
Das ist aus der Proftpd-Faq von http://www.proftpd.de/

Code:

Symlinks

Symlinks will not work from within a chrooted area. The reason should be clear from a casual inspection of the nature of the chroot command. It is not possible to have a symbolic link to a directory which can't be reached beacuse it's outside of the current chroot. Work arounds to allow access to other parts of the file system include exporting the part of the filesystem to be accessed from inside the chroot and mounting via NFS, using hard file links or (on Solaris) using lofs to mount the directory via the loopback.


mount -Flofs /home/data1 /ftp/data1
mount -Flofs /home/data2 /ftp/data2

As of the 2.4.x Linux kernel tree it is possible to mount filesystems multiple times and to mount subdirectories of filesystems elsewhere on the filesystem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum