Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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

share|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 '12 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 '12 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 '12 at 18:18

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.

share|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 '12 at 17:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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