Linux File Permissions - samuel-richardson/Sam-Tech-Journal GitHub Wiki

File Permissions

Create Groups

  • use groupadd groupname

Add user to group

  • Use usermod -g groupname username to change the primary group
  • Use usermod -a -G groupname username to add to the group

Change directory group

  • Use chgrp groupname /directory to change the group of a directory.

Change permission

  • Change group permissions with chmod g+-rwx file/directory
  • Change everyone's permissions with chmod o+-rwx file/directory