Some useful linux commands to help with editing web pages on a server:
To give access to others to my www folder (so I don’t have to login as sudo):
chmod 2775 . -R
To show the groups for the selected user:
groups <username>
groups www-data
To add the www-data user to the local user’s group. (When you create a user, i.e. Bob, Ubuntu will create a Bob group.)
sudo usermod -G Bob www-data
To add a bunch of groups to a user:
sudo usermod -G groups,separated,by,commas username