Apache: Isn't chmod 755 enough to set up symlink or alias on Apache httpd on Mac OS 10.5?
- by eed3si9n
On my Mac OS 10.5 machine, I would like to set up a subfolder of ~/Documents like ~/Documents/foo/html to be http://localhost/foo.
The first thing I thought of doing is using Alias as follows:
Alias /foo /Users/someone/Documents/foo/html
<Directory "/Users/someone/Documents/foo/html">
Options Indexes FollowSymLinks MultiViews
Order allow,deny
Allow from all
</Directory>
This got me 403 Forbidden. In the error_log I got:
[error] [client ::1] (13)Permission denied: access to /foo denied
The subfolder in question has chmod 755 access. I've tried specifying likes like http://localhost/foo/test.php, but that didn't work either. Next, I tried the symlink route.
Went into /Library/WebServer/Documents and made a symlink to ~/Documents/foo/html. The document root has
Options Indexes FollowSymLinks MultiViews
This still got me 403 Forbidden:
Symbolic link not allowed or link target not accessible: /Library/WebServer/Documents/foo
What else do I need to set this up?
Solution:
$ chmod 755 ~/Documents
In general, the folder to be shared and all of its ancestor folder needs to be viewable by the www service user.