I am on a shared hosting package on a LAMP stack with no shell access.
I can create symlinks using PHP's symlink()
function.
Let's say my web root is /home/www/user1/public
Let's say I have a real directory named /home/www/user1/public/real_dir
And I create a symlink named /home/www/user1/public/fake_dir
pointing to real_dir
Why would I get a 403 Forbidden when trying to access www.mydomain.com/fake_dir
but not when trying to access www.mydomain.com/real_dir
?
It shouldn't be a rights problem because when I create a file in PHP, I can access that all right.
I tried switching FollowSymlinks
off and on in .htaccess (it was on), but no luck.
Could it be that FollowSymlinks
is defined as not overwritable in a .htaccess file? Or is there something else to be aware of when working with Symlinks in Apache?
FollowSymlinks
is off, trying to access a symlink (even though the target is also in the web root) will raise a 403? Is this the reason? – Ianteen