Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

running

dseditgroup -o checkmember -m admin _www 

returns

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

1 Answer 1

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 at 7:29
    
please update main question if you want to ask something else completely. –  edvinas.me Apr 23 at 7:30
    
ok i'll mark your question as answered.. and ask another question –  abbood Apr 23 at 7:32
    
asked here –  abbood Apr 23 at 7:36

Your Answer

 
discard

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.