Like the title said, for some reason I am getting a 403 when apache tries to follow a symlink created by the root user. For example:

This works

lrwxrwxrwx  1 repxadmin psacln    15 Jan 25 02:09 httpdocs -> assets/app/web

But this doesn't

lrwxrwxrwx  1 root root    15 Jan 25 02:09 httpdocs -> assets/app/web

Same exact files on the receiving end. Is this expected behavior or is there something I can change in my server configuration to let apache follow a "root" created symlink?

If it matters the site is on centos and running plesk.

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

This behaviour is almost certainly the result of the SymLinksIfOwnerMatch setting.

Your log will tell you. Always read server logs before posting questions.

Further reading

link|improve this answer
It's much more likely that the target directory only allows owner or group access, which means root:root ownership denies others (including apache) read access. SymlinksIfOwnerMatch will not solve this - in fact, it will make it less likely to work ;) – adaptr Jan 25 at 17:05
I tried adding "Options -SymLinksIfOwnerMatch" to the directory in the configuration however the error message I recive has not changed. Without that and with it the error in the logs is: Symbolic link not allowed or link target not accessible – Steven Jan 25 at 18:09
@Steven Is there potentially another Options directive applying to the request? A Location block or an .htaccess file, perhaps? – Shane Madden Jan 25 at 18:18
feedback

You need to look at the permissions of the target; symlink permissions are always 777.

Also check your settings for Options FollowSymlinks in those locations - perhaps the physical directories are simply configured differently.

link|improve this answer
I am linking to the same exact file so that could not be an issue, the only difference between links is the owner of the link. – Steven Jan 25 at 17:57
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.