I've run into this issue from a couple of different angles on OS X. It seems as if you are having a permissions error.
I suggest you check out this post, what you need to do is make sure the _www group has access.But, BEFORE YOU DO WHAT THE ABOVE LINK SAYS, try a solution with Finder.
- Go to the root web directory in your finder.
- Right-click and 'Get Info'.
- Look at the permission of the
_www
user. Make sure it has 'Read & Write' access.
- Click the settings-cog on while
_www
is selected.
- Select the following options: "Make
_www
the owner" and "Apply to enclosed items..."
Try accessing your web server now.
If this does not work, or if there is no _www
user, revert back to the post I spoke of earlier.
Try the suggested lines in terminal:
Let DIR be the different directories leading to your website. Replace "~
" with the full directory path.
For each parent directory leading to your web root (e.g. ~/my
, ~/my/web
, ~/my/web/root
)
Then apply these commands to just the web root.
sudo chgrp -R _www ~/my/web/root
(all web content is now group _www)
chmod -R go-rwx ~/my/web/root
(nobody other than owner can access web content)*
chmod -R g+rx ~/my/web/root
(all web content is now readable/executable/enterable by _www)
Try to access your website again. If this doesn't work, go back to finder and try to add add the permissions again as stated in the first part of this post.
If you are using Server for OS X you may also enable and edit sharing properties for other users and FTP.