Give PHP permission?

phatcactus

The Ugly Organist
Forgive me if this is in the wrong forum; I was torn between the two, but I figure this can apply to more than just PHP.

Basically, I need to give PHP write access to my entire web directory (/Library/WebServer/Documents/), including subfolders, and all the files inside. Permissions freak me out. Anyone care to bail me out? ;)

EDIT: While I'm at it, I might as well set the owner of everything to something consistent.

I'm lookin' through the man pages for chown and chmod. It's all very frightening.
 
The group named "www" is the group under which Apache runs, so make the areas you need to write into group-writeable and owned by group "www." PHP will then be able to write there.
 
use the following commands:

sudo chgrp -R www /Library/WebServer/Documents/

sudo chmod -R g+rw /Library/WebServer/Documents/
 
Thanks guys. I kiiinda understand the permissions system a little better now, so I shouldn't be bothering you anymore. :)
 
Back
Top