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 have a problem bugging me with Mac OS X's native Apache/PHP installation.

With my PHP scripts, I have to alter the file permissions on each folder I want to access. For example, in an upload script I would have to set the destination directory to 'read & write' for the group 'everyone'. However, I believe this is not the best practice and would like all of my directories to be readily writable to PHP.

My scripts are stored in /Library/WebServer/Documents/, which is Mac OS X's default directory to serve web pages locally.

share|improve this question
    
Consider rethinking your approach -- making all directories writable to the webserver process is rarely a good practice. I've helped clean up a number of hosts in this last year where a bad shell script allowed a remote user to insert an 'index.php' that looked to serve what had previously been in 'index.html', but would serve viagra ads when called with a QUERY_STRING. –  Joe H. May 17 '10 at 14:18

1 Answer 1

I guess you are running the client version? The server is running as user _www, group _www, so your files/dirs must be accessible at least for the _www group, not for everyone.

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.