1

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?

1
  • permissions further back may prevent access, have you ran a disk utility > check permissions? Commented Aug 17, 2011 at 14:36

3 Answers 3

2

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)

2
  • Yep - that was it. Somehow I removed the execution from the directory. Was staring at it and it just didn't register - thanks! Commented Aug 18, 2011 at 9:35
  • I thought I had, sorry. Commented Aug 19, 2011 at 9:59
2

Take a look at other directories' permissions; for example, your home directory vs. the other home directories:

ls -le /Users/ 

It should look something like this:

drwxr-xr-x+ 13 user1 staff 442 12 Nov 2010 user1/ 0: group:everyone deny delete drwxr-xr-x+ 63 user2 staff 2142 9 Aug 16:55 user2/ 0: group:everyone deny delete 

There's a good chance that your home directory has somehow been set to different permissions (e.g. 700), and that's causing Apache to choke.

1
  • Thanks - that helped point me in the right direction. Execution permissions had been turned off somehow (hmm...) Commented Aug 18, 2011 at 9:36
-1

Right click, go to Get Info, and at the bottom you can change permissions.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.