Symbolic Link
samwyse
dejanews at email.com
Sun Sep 9 21:48:45 EDT 2007
mosscliffe wrote:
> On 22 Aug, 00:05, Ian Clark <icl... at mail.ewu.edu> wrote:
>>
>>>On Aug 19, 4:29 pm,mosscliffe<mcl.off... at googlemail.com> wrote:
>>>
>>>>The source file is in an area which python can see, but not the
>>>>browser. I am trying to make a link in a browser friendly area so I
>>>>can use it to display an image file.
>>
>>My question would be why a symbolic link? Why not a hard link? Are the
>>two directories on different mount points? After the script finishes
>>does python need to see that image file again? Why not just move it?
>
> I have tested a hard link now and it seems to work fine. I am
> deleting the link/s at the end of the session/s.
This is a bit late, but the reason the symbolic link won't work is
because it's the web-server that's resolving it. The browser can only
see things that the web-server, huh, serves, so what was meant in the
first paragraph above was that the web server couldn't access the file
in its original location. If you create a sym-link, the web server
opens the link, finds out the actual location of the file, and tries to
open that file, which it still can't do. A hard-link, OTOH, allows
direct access to the contents of a file, as long as it is on the same
filesystem. No extra steps are required, so the process runs a few
microseconds faster, and directory-level permissions can't get in the way.
More information about the Python-list
mailing list