I know there is a ton of questions like this on here. I have looked at, I feel like, all of them and tried the solutions. However I have been running into this issue for a while now.
I have a user that is part of the www-data group. We will call him userA. On my server I have folders setup as Production and Testing. Both are owned by root:www-data.
drwxr-sr-x 2 root www-data 4096 Jan 14 17:25 production
Now with the above directory, in order for me to add files I have to chown to userA:www-data, and then back to root:www-data, once i complete the updates.
userA is part of www-data group
userA: userA adm www-data
I was under the impression that if a user is part of the group he would be allowed to edit and add files and directory. What am I missing here?
chmod g+w -R /path/to/folder
. – Piotr P. Karwasz Jan 15 '20 at 16:54