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

I have been told to chgrp and chmod (770 and g+s) the directory I need to be shared between the user 'apache' and the user that owns the website files.

When the owner creates new files in there, they have by default this permissions: 664, which isn't perfect, but it's ok.

The problem is that when apache (with a php script) creates new files in there, they have this permissions: 644.

Then the files created by apache are not writtable by the group. How do I fix that? I want it to be 664 by default, or 770.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You cannot have both 0664 and 0770, but if you set the umask to 0002 before running httpd then you can have 0664 and 0775. Note that this may require modification of the initscript used to start it.

share|improve this answer

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.