Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Tom

share|improve this question
    
Sorry, not really. –  Ignacio Vazquez-Abrams Nov 29 '10 at 11:56
add comment

1 Answer

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
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 '10 at 14:35
add comment

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.