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'm on a Mac, but I guess it applies to Linux too, since I'm using a command line. When I write web applications, the apache user (which is _www on a Mac) has to be able to edit files as well as me.

Also, I don't want to set this for every single file or folder, I would like to set up the root folder and then I and _www will have access to every file inside this root directory.

As it stands now, I have to use chown or edit with sudo to accomplish things.

share|improve this question
up vote 2 down vote accepted

Add yourself to the group _www and add write permission to the group.

 usermod -a -G _www your_username 
 chgrp _www filename
 chmod 775 filename
share|improve this answer
Great, thanks! This got me to an answer, so I'm set you answer to accepted. Just two things I had to do also / differently: useradd is not a command on a Mac, so I had to use this command: sudo dscl . append /groups/_www GroupMembership my_username. Also I had to do sudo chmod -R g+w root_folder so that the _www group (which I am a part of now) can write to files. – duality_ Jun 17 '11 at 10:40

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.