I need the directory /var/www/ (and everything inside it) to be modifiable by only authorized users.The way I tried to do this was:sudo groupadd webmasterssudo usermod -G webmasters pi # My user is pisudo chown -R root:webmasters /var/www/sudo chmod -R ug+rw /var/www/...but I can't modify anything in /var/www/, nor can I create new files in it.What am I doing wrong? How do I set this up the way it needs to be?What I'm envisioning is:Everyone in the group webmasters can create, delete, and edit files in /var/www/All newly-created files/folders are owned by root:webmastersAll newly created files have permissions 775: -rwxrwxr-xIs is vital that no one without authorization be able to have write permissions, OR any sort of Setuid/Setgid ability. (Authorization for write access can only be granted by Root.)Am I taking the wrong approach to this? Do I have the right idea, but I'm just messing something up? What's going wrong?
How do I set up proper ownership of these files?
permissions;group;read write