I am trying to grant my user write permission to the /var/www/html directory. I have executed so far:
# sudo usermod -aG www-data $USER
# sudo chown -R www-data:www-data /var/www/html
# sudo chmod -R 775 /var/www/htmlThis, in my opinion, should suffice, but unfortunately, I still can't overwrite the files in the web directory or create new files there. If I execute id I don't see that my user user1 belongs to www-data:
# id
uid=1001(user1) gid=1001(user1) groups=1001(user1),27(sudo),110(lxd)but if I execute it defining the user I see that my user belongs to group 33 (www-data)
# id $USER
uid=1001(user1) gid=1001(user1) groups=1001(user1),27(sudo),33(www-data),110(lxd)The groups command is also not showing that I am part of the www-data group.
# groups
user1 sudo lxdI am totally lost here, what I am doing wrong and why I still can't overwrite the files in the /var/www/html directory?