On OS X by default Apache runs as the user www and belongs to the group www. Also, by default, when I create a new directory in /Library/WebServer for use as a virtual host (for development purposes, let's say), the directory is created with me as the owner and admin as the group. This is a problem if you want to allow Apache to modify the directory structure because www is not a member of the admin group.
Unless I set the write permissions for the new directory to all writable (773, for example), mkdir() fails due to permissions.
My question is, is there a good resource out there that discussions or demonstrates how to manage user permissions without just hacking away (so that errors are handled gracefully)?
I realize I can just make the directory world-writeable, which isn't a terrible alternative given that this is on my development machine, but it doesn't seem like the right thing to do.