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.



1 Answer 1


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
  • 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, 2010 at 13:58
  • 1
    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, 2010 at 14:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .