« Switching Method Naming Conventions in Perl | Main | Annoyed at Decision to use Storable.pm »

May 18, 2004

Change File Permissions on Apache-created Files

I've been digging around trying to find an answer to how to get apache to create files with different permissions. We sync the files between a few machines using another user, and need apache-created files as rw-rw-r-- (default seems to be rw-r--r--) so they can be overwritten by the rsync user (who's in the apache group) if the file is updated on another machine.

I couldn't find a clear "this is how you do it" but a lot of suggestions about using umask. I added umask 002 to /etc/init.d/httpd, restarted apache and now files are created rw-rw-r--, just like I wanted.

A little too easy . . .

Posted by mike at May 18, 2004 4:27 PM