I'm struggling with this. Lets assume the following:
A user named 'deploy' has a directory in his home directory called example.com. In it, there are a number of files and their permissions are set like so:
drwxrwxrwx 6 deploy deploy 4096 2010-02-10 21:06 example.com
There is also a fresh installation of apache 2 running as www-data:www-data.
I need the files to remain owned by deploy:deploy but I need apache to be able to write to those files.
Shouldn't adding www-data to the deploy group or vice versa, allow apache to write to the example.com directory?
My /etc/groups file shows (Truncated for brevity):
www-data:x:33:deploy deploy:x:1000:www-data
Yet the www-data user can't write to the directory. It's driving me crazy! Help?