Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 pulling my hair out with Redhat at the moment...

How can I set the default user:group permissions for apache generated files and folders?

Hope this makes sense.


share|improve this question
Sorry, not really. – Ignacio Vazquez-Abrams Nov 29 '10 at 11:56
up vote 2 down vote accepted

Check /etc/passwd maybe apache user already created, in debian it's www-data, in redhat maybe something else..

Anyway this should be added to httpd.conf file. (Or any other configuration apache file in redhat (not familiar with redhat) something like apache2.conf)

  User www
  Group www

to set group and user for all public_html directory use this command

chown -R www:www /your_public_html
share|improve this answer
legend, I edited httpd.cont (found it by running: locate httpd.conf) and in there was the User and Group lines as you suggested. – Tisch Nov 29 '10 at 13:58
Proper ownership might not be enough if the permissions are too lax. Add chmod -R 400 to everything that is read-only content. – Marcin Nov 29 '10 at 14:35

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.