I'm on Mac OS X lion, and I use apache for php and rails development. What groups or permissions should I set so that apache, through the _www user/group has full read/write access to my website directories (located in ~/Projects) but also keeping my own read/write access for changing files?
Set group to _www, user to your username and permissions to 770 i.e.
sudo chown username:_www ~/Projects -R sudo chmod 770 ~/Projects -R
In addition to what @lsmooth wrote, if you want newly created files in a directory stick with the group ownership of this directory you have to set the group sticky bit in the file permissions which passes permission bit AND owner ship for the group to newly created files.
sudo chmod g+s path/to/directory
The MacOSX toolchain is different from the GNU toolchain, but with GNU find you can apply this to all directories in the following way:
find ~/Projects -type d -print0 | sudo xargs -0 chmod g+s
Usually POSIX semantics implement this behaviour, not sure if MacOSX does so also.