Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Can't Change ownership of symlink



All the web sites I work on are in a directory called "web_sites" inside my
home directory. Then I have a symlink in my /var/www directory, also called
"web_sites" that points to the web_sites directory in /home/dave.

This has worked fine for ages, and then just yesterday, I tried to open one
of my local web sites, as usual, and I got a "403 Forbidden" error.
"Forbidden
 You don't have permission to access / on this server."

I went to http://localhost just to see if the directories were there, but
the "web_sites" directory was not visible.

So I turned to the command prompt, and listed the contents of /var/www, and
my "web_sites" symlink is there:
lrwxrwxrwx  1 root root   20 2007-06-27 09:41 web_sites ->
/home/dave/web_sites

Ideally you should chown the files to the same uid and gid as that of the web server. I would also recommend more restrictive permissions for "others".

What does "ls -l /home/dave/web_sites" give you?

Since you mentioned you have not changed anything. I'm assuming that
the FollowSymLinks option in your apache config files (or .htaccess)
is unchanged...

 I thought it was odd that the ownership was "root root", so I tried:
sudo chown dave:dave web_sites
... but that hasn't changed anything. It still says the owner and group is
"root".

Why is my chown command not working?

You must be root to chown those links. They are owned by root...

Regards, Keith


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links