Symlink Problem (FTP)

Backup, Restore und Transfer von Daten
Post Reply
dts
Posts: 290
Joined: 2004-02-05 20:40
 

Symlink Problem (FTP)

Post by dts »

Hallo,

Ich habe ein Problem mit einem Symlink, der in /var/www/web11/html/cgi-bin/shops/s000001 liegen soll, den Namen "html" tragen soll und nach /var/www/web11/html/s000001 verweisen soll.

Weiters sollte der Benutzer auch Schreib-/Leserechte (per FTP) in diesem Verzeichnis haben, da es schliesslich auch im gehört.

Ich sehe das Verzeichnis zwar per FTP als Symlink, jedoch kann ich nicht in diesen wechseln. Stattdessen erhalte ich die Meldung "[R] 550 html: No such file or directory".

Wer kann mir dazu bitte einen hilfreichen Tip geben?

Lg
Jürgen
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Symlink Problem (FTP)

Post by Joe User »

Code: Select all

ln -sf /var/www/web11/html/cgi-bin/shops/s000001/html /var/www/web11/html/s000001
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
dts
Posts: 290
Joined: 2004-02-05 20:40
 

Re: Symlink Problem (FTP)

Post by dts »

Hi Joe,

Danke für deine Antwort, jedoch klappt dies nicht.
Mein FTP-Programm (FlashFXP) meint dazu:
[R] CWD html
[R] 550 html: No such file or directory
Gibts dafür eine Lösung, denn das Verzeichnis existiert doch.

Lg Jürgen
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Symlink Problem (FTP)

Post by Joe User »

Hast Du es mal mit einem vernünftigem FTP-Client (WS_FTP Pro) versucht?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
dts
Posts: 290
Joined: 2004-02-05 20:40
 

Re: Symlink Problem (FTP)

Post by dts »

Hallo,

Ich arbeite mit FlashFXP schon seit mehr als 4 Jahren, kann es aber gerne mal mit WS_FTP Pro probieren und dann berichten, ob es damit geklappt hat.

Lg
Jürgen
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: Symlink Problem (FTP)

Post by superuser1 »

Hi...

http://www.proftpd.de/forum2/viewtopic.php?t=67

http://www.vsftpdrocks.org/faq/
Q) Why don't symlinks work with chroot_local_user=YES?
A) This is a consequence of how chroot() security works. As alternatives,
look into hard links, or if you have a modern Linux, see the powerful
"mount --bind".
:roll:
dts
Posts: 290
Joined: 2004-02-05 20:40
 

Re: Symlink Problem (FTP)

Post by dts »

Hallo,

Also mit WS_FTP funktioniert es auch nicht...
Hier die Fehlermeldung der Software:
Failed, error: 550
Die Sache mit dem "defaultroot~" gefällt mir gar nicht... :(

Gibt es hier nicht sowas mit "AllowSymlinks" oder ähnliches?
Das mit "mount" ist nicht so mein Fall...

Aber eine halbwegs akzeptable Möglichkeit muss es doch geben?

Lg
Jürgen
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: Symlink Problem (FTP)

Post by superuser1 »

Hi...
Aber eine halbwegs akzeptable Möglichkeit muss es doch geben?
lesen: http://castaglia.org/proftpd/modules/mod_vroot.html

:roll:
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Symlink Problem (FTP)

Post by Joe User »

Hardlink statt Softlink?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
dts
Posts: 290
Joined: 2004-02-05 20:40
 

Re: Symlink Problem (FTP)

Post by dts »

Hallo Joe,

Hmm, man kann doch einen Hardlink doch nur auf eine Datei erstellen, aber nicht auf ein Verzeichnis, oder habe ich da etwas falsch verstanden?

Wie würdest du es denn mit einem Verzeichnis haben, wenn du mir schon einen Hardlink empfiehlst?

Lg Jürgen
dts
Posts: 290
Joined: 2004-02-05 20:40
 

Re: Symlink Problem (FTP)

Post by dts »

Joe?
Keine Lösung...?
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Symlink Problem (FTP)

Post by Joe User »

Code: Select all

man ln
ln -d foo bar
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
dts
Posts: 290
Joined: 2004-02-05 20:40
 

Re: Symlink Problem (FTP)

Post by dts »

Hi Joe,

Demnach wäre der korrekte Befehl:

Code: Select all

ln -d /var/www/web11/html/cgi-bin/shops/s000001/html /var/www/web11/html/s000001
Aber... das klappt nicht:

Code: Select all

ln: Zugriff auf ,,/var/www/web11/html/cgi-bin/shops/s000001/html": Datei oder Verzeichnis nicht gefunden
Wie ich ja schon sagte, kann das mit Hardlinks nicht funktionieren, weil:
Man kann i.a. auch keine "hardlinks" auf Verzeichnisse machen.
Praktischer und viel öfter verwendet werden daher die symlinks.
Also scheint es für mein Problem keine gute Lösung zu geben?

Liebe Grüsse
Jürgen
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: Symlink Problem (FTP)

Post by superuser1 »

Hi...
Also scheint es für mein Problem keine gute Lösung zu geben?
Also ich weiss echt nicht, was du unter einer guten Lösung verstehst?

Im Falle von ProFTPd ist mod_vroot ja wohl die eleganteste aller Lösungen.
Und was dir an mount --bind nicht gefällt, entzieht sich auch meinem Verständnis.

Irgendwie klingt mir das etwas nach - sorry - "ich will meine Suppe nicht essen"...

Ansonsten musst du eben über eine geänderte Verzeichnisstruktur nachdenken, die dein Problem löst...

:roll:
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Symlink Problem (FTP)

Post by Joe User »

DtS wrote:Wie ich ja schon sagte, kann das mit Hardlinks nicht funktionieren, weil:
Man kann i.a. auch keine "hardlinks" auf Verzeichnisse machen.
Praktischer und viel öfter verwendet werden daher die symlinks.
Ich weiss zwar nicht, wen/was Du zitierst, aber in meinem man steht etwas Anderes...
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
dts
Posts: 290
Joined: 2004-02-05 20:40
 

Re: Symlink Problem (FTP)

Post by dts »

8O

Also jetzt verstehe ich gar nichts mehr...

Könntest du mir mal den korrekt Befehl zukommen lassen?

Danke dir!

:wink:
superuser1
Posts: 291
Joined: 2003-11-26 18:43
Location: earth
 

Re: Symlink Problem (FTP)

Post by superuser1 »

Hi...
Joe User wrote:Ich weiss zwar nicht, wen/was Du zitierst, aber in meinem man steht etwas Anderes...
Mein man gestattet auf dem Papier auch Hardlinks auf Verzeichnisse, aber funktionieren tun sie trotzdem nicht.

Soweit ich weiss, sind Hardlinks auf Verzeichnisse bei aktuellen Distributionen selbst für root verboten - Stichwort Schleifenfreiheit in Verzeichnisbäumen...

:roll:
Post Reply