I have Ubuntu server with Apache 2, PHP, and various DBMSs running in VirtualBox on my Mac host for my web development work. To easily create/edit the files I'm working on, I mounted a directory from my Mac host via the VirtualBox shared directory feature to
/var/www/. Every file I create on my Mac host has the following permissions on the on the Server:
-rw-r--r-- 1 root root 6 2011-07-30 01:27 test.
The problem is that most PHP scripts/frameworks/etc. need write access to some files. It is extremely annoying to have to chmod every new file/directory that needs write access. Is there a way to set the correct permissions for the files/directories automatically?