Preview:
# Check if 'webmasters' group exist

cat /etc/group | grep webmasters

# Create 'webmasters' group

sudo addgroup webmasters

# Add users to 'webmasters' group

sudo usermod -a -G webmasters username

# Group assignment changes won't take effect
# until the users log out and back in.


# Change group owner of the directory to webmaster user

sudo chgrp -R webmasters /etc/nginx/
  
# Give write permission to the group

sudo chmod -R g+w /etc/nginx/
  
# Create file as different user

sudo -u username touch /etc/nginx/test.txt
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter