MacOS – ~/Sites folder gives 403 error

apachemacospermissionsnow leopardwebsites

This is likely a stupid question, and it should be easy, but I'm clearly not seeing it.

My local Sites directory seems to have changed permissions since using it yesterday. It's been working fine for months and I can't for the life of me figure out what's changed.

  • The localhost works fine, but my home Sites folder gives a 403
  • my local Sites directory (~/Sites) is 755 permissions, as are the directories inside, and the files are mostly 644
  • Permissions on ~/Sites is drwxr-xr-x+, owned by my shortname & staff, which seems right
  • Checked apachectl configuration and got a "Syntax OK" response
  • Just to be clear, this was working. My /etc/apache2/httpd.conf allows for user-directories (uncommented) and it resolves the virtual hosts I've set, they all just have some mystical 403 blocking them.
  • Adding insult to injury, the Sites work in other user profiles on the machine, and they have the same permissions

So – stumped. What am I just not seeing?

Best Answer

You have to reach that directory with the running user of the Apache process. You can check that by sudoing to it and try to go there from the / (root) directory.

The easiest way is to have the execute permission set for others on every directory from root to your user's Site directory.

To check:

ls -ld /Users ~/ ~/Site

And the fix:

chmod +x /Users ~/ ~/Site

(You may need to sudo to modify)