I want to have different users including www-data to work together under a specific path. including updating each others files.
I made a new group webimage
addgroup webimage
and
adduser user1 webimage
adduser user2 webimage
adduser www-data webimage
I changed the permissions of the imagedir
chown -R www-data:webimage image/
and user1
can write but the file has permisions
-rw-rw-r-- 1 user1 user1
and no one can update the file but this user. How can I get this to work in a secure manner. Outside of this directory of course each users file is private as usual.