"Symbolic link not allowed or link target not accessible" / Apache on CentOS 6
Found the issue. Turns out, Apache wants access to not just the directory I'm serving, /home/billy/refresh-app/
, but also every directory above that, namely /home/billy/
, /home
, and /
. (I have no idea why... giving someone access to a subdirectory shouldn't require giving away permissions to everything above that subdirectory....)
I would guess it's looking for .htaccess
or something, or perhaps *nix being strange about how it treats permissions for directory transversal.
I had a similar problem where I had the following configuration which used to work with Ubuntu 10, but stopped working with Ubuntu 14 (Apache 2.4):
<Directory /var/www/vhosts/example.com/httpdocs>
Options +FollowSymLinks
</Directory>
Switching to this sorted the problem (even though the web server user wasn't able to directly access the symlink)
<Directory /var/www/vhosts/example.com/httpdocs>
Options +ExecCGI +FollowSymlinks -SymLinksIfOwnerMatch
</Directory>
From what I can tell its just the -SymLinksIfOwnerMatch
setting and has something to do with changes in Apache 2.4 but I haven't tried researching the exact cause.
I also thought it could be down to openbase_dir
restrictions in PHP but it wasn't that.
This error can also be caused if you are linking to an encrypted folder.