I'm usuing Ubuntu 12.04LTS and have created an apache virtual host in my local file system for a site I'm developing. However, when apache tries to access the site, it can't because the ownerships are all in my own username and not www-data. So I changed all the ownerships:
$ chown -R www-data:www-data domain-root-name
Apache is now happy, but I'm not, because I can no longer do anything with the files - which I need to do for development purposes.
I tried doing the reverse (adding www-data to my own group), but that just meant that apache could no longer access the site.
There's lots of stuff about this all over the place but nothing works for me. Mainly the suggestion is to add yourself to the www-data group. This is not sufficient, however, as I still can't edit the site's files.
The other suggestion is to set all permissions to 777, which makes lots of respondents hold their hands up in horror, even though it (obviously) works.
Is there anyone out their who has solved this problem so that a developer can develop safely on a local apache installation?