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.

link|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
feedback

1 Answer

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.