Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I copied over a php folder from computer to another and hooked it up to apache.. however apache would return page forbidden.. after doing some research it turned out it was a matter of giving apache access to the folder.. so this is what i did:

sudo chown -R _www /website/directory

however after doing that, running my git alias commands such as git la returns this error:

fatal: unable to access '.git/config': Permission denied

if I run whoami I get admin.. so I decided to add admin to the _www group like so:

sudo dseditgroup -o edit -a admin -t user _www


dseditgroup -o checkmember -m admin _www 


yes admin is a member of _www

however running git la still returns the same error above.. what do i do?

share|improve this question
up vote 1 down vote accepted

Change owner of /website/directory/.git to your user:

$ chown -R admin /website/directory/.git
share|improve this answer
ok maybe i should have asked the question a different way: how do i give apache access to my project root directory.. without taking away any of my admin user rights? b/c right now i can't even save the file in phpstorm or anything! if i run ls -l I get drwxrwxrwx 19 admin admin 646B Apr 22 17:39 lesson-plan-dev every other file in that directory has something like this drwxrwxrwx 6 admin staff 204B Mar 31 10:37 libraries.. ideas? – abbood Apr 23 '14 at 7:29
please update main question if you want to ask something else completely. – phoops Apr 23 '14 at 7:30
ok i'll mark your question as answered.. and ask another question – abbood Apr 23 '14 at 7:32
asked here – abbood Apr 23 '14 at 7:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.