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 have apache set to the _www user account. Every time I create a file in the site directory, It's getting created with owner/group of myusername / wheel, so apache doesn't have access to it and I have to go chown+chmod the folder/files. Looking for either a "correct" setup or any suggestions.

This is a development machine.

share|improve this question

You could create a group called www-admin and add yourself and apache to it. When you work on the website, change your active group to www-admin and make sure the files are readably by group. You'll still own the files, but Apache will have correct access to them. Here's a guide on Unix Groups.

If this machine has more than one user, you could also consider moving to using per-user web directories and setting up Apache with su-exec so it'll run as the user that owns the directory. This probably isn't necessary or useful on most dev machines, though (this is the setup that shared hosting companies use).

share|improve this answer
Thanks for the suggestion, but I'd still have the same issue if doing anything outside of terminal, e.g. from finder / photoshop – zyklus Jul 5 '11 at 21:39
You might be best off going the su_exec way, then (which I just edited in). Documentation here: – jcrawfordor Jul 5 '11 at 21:42

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.