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

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.