Give apache write access to DocumentRoot on dev server

Posted by Abhi Beckert on Server Fault See other posts from Server Fault or by Abhi Beckert
Published on 2012-04-08T10:20:32Z Indexed on 2012/04/08 11:32 UTC
Read the original article Hit count: 375

Filed under:
|
|
|

I've got apache running on my mac workstation (OS X 10.7, with the pre-installed copy of apache), and our web applications require write access to certain sections of the filesystem to run (usually just a tmp dir, but sometimes more than that).

We have (literally) thousands of clients, and I want to be able to quickly grab a copy of any website's code, and have it "just work", however I always need to manually modify the unix permissions of specific directories after pulling a client's website out of source control (the list of directories varies from one client to another, as it has changed over the years).

Since it's a dev server, firewalled off from the general internet, I would like to give apache/php write access to the entire DocumentRoot. How can I do this?

I tried chmod 777 on the DocumentRoot, but if I create a directory inside it, the permissions are still 755 (owner: me, group: wheel).

I think there should be a way to force all files created inside DocumentRoot to be 777 or perhaps 775, with the _www user added to the wheel group?

© Server Fault or respective owner

Related posts about apache2

Related posts about macosx