I am working with two users: me and www-data. Each user has their own group by default. I want to be able to easily grant read, write, and/or execute permissions to both users, without giving the permissions to the public.
My understanding of the linux file permissions system is that if I have the following file:
test.php me:me 770
and the group me contains the users me and www-data, then both users would have full permissions for the file test.php. This is not working, however. I have added the user www-data to the group me and set the permissions to 770, but apache says permissions are denied. If I change the file group to www-data so that it looks like
test.php me:www-data 770
the file loads fine. The problem is that I upload the files over ftp under the user me. It's easy to change the group, but it gets incredibly tedious if I have to ssh into the server every time I upload a new file to change the group. My understanding is that groups exist just for circumstances like these, but I don't understand why it's not working.
Thanks in advance!