0

Strange problem.

I have a 32 bit machine "A" running apache where when I create a symlink to a directory and access that link on the browser, I am able to see the contents of that directory.

But on a 64-bit machine "B" that is running the same version of apache, the page shows "Forbidden" message.

I have created the links as "root" user. I am unable to access the links from either machine as "root" user but as a regular user it works fine.

Why is it that the symlinks work on one and not on the other? Does it have something to with the 32/64-bit machine (although I strongly feel it does not matter).

If I change the permissions of the directory to which I have given the symlinks to, it works from machine B. But I am not actually supposed to change the permissions like that.

Any help would be greatly appreciated.

1 Answer 1

0

you have created the ownership as root, that is the reason it is not accessible.

In apache for it to access a particular directory or files in it for example /var/www/my-site/index.html

then you need to change its ownership to www-data using the command for its directory and files inside it.

sudo chown -R www-data:www-data /var/www/my-site

else you will not be able to access due to permissions problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .