I've been a linux admin for quite a while and recently switched to OSX for reasons I wont go into.
I thought I had all my permissions correct, but I would occasionally get 'PHP can't write to file/folder warnings.'
Finally, after not being able to update, with the help of Aleksey, were able to pin point the problem.
OSX has a group ID called www or _www, which is the web group owned by apache/php/etc. I thought everything was correct, but after looking inside the directories, I would occasionally see a file or two who didn't have read/write access on the appropriate group ID.
Doing an ls -la in a directory will show you the current owner and permissions of every file.
Below is a sample output from that command:
drwx--x---+ 9 user www 306 Mar 3 11:19 Web
Currently, my user has read/write/execute permissions to the directory. The problem is, my web doesn't have any read or write permissions, only execute.
So in my situation, I had to grant my www group read/write permission to every file in the lemon stand directory. However, you want to do so without removing any execute bit on the files that live there. So the following command will do the trick:
chmod -R g=rw,+X Web
That command will recursively set the read and write permissions for everything in the Web directory, and if the execute bit was set, it leaves that intact.
Of course, you'll want to make sure that every file in the directory is also owned by the group www, so you can do so with the following commands:
chown 'username':www -R Web
Hope that helps others.
Page 1 of 1
Mac OSX Server Permission Errors, Random MYSQL Errors, and Wont Update
Share this topic:
Page 1 of 1

Help











