Link file not opening on webserver

Tim ignored_mailbox at yahoo.com.au
Fri May 25 00:03:43 UTC 2007


On Thu, 2007-05-24 at 13:37 +0100, Paul Ward wrote:
> Can anyone tell me how to link a file from from my home directory
> to /var/www/html so it can be a acccessed remotley.
> 
> I used the following to link the file which worked fine.
> 
>  # ln -s myfile /var/www/html/

That's linking a file to a directory?

>  # ls -l /var/www/html
>  lrwxrwxrwx 1 root root 23 May 13.19 myfile.html
> -> /home/user/myfile.html
> 
> When going to my webserver http://myfile.html does not open up I get a
> permisson problem how do I get round this? 
> 
> -----------------------------------------------------------------------------------------------------
> Forbidden
> 
> You don't have permission to access myfile.html on this server

That doesn't quite match what you wrote in the link command, above
(myfile versus myfile.html).

As pointed out, Apache needs configuring to follow symlinks (for
security purposes).  SELinux can also play a role in what's allowed to
be served.

An alternative is to have a directory within the /var/www/html/ tree
that *you* are allowed to write to, and put a symlink to it in your
homespace.  Now you can write to files, there, while working from your
homespace directory.


-- 
(This box runs FC5, my others run FC4 & FC6, in case that's
 important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.




More information about the fedora-list mailing list