Linux File Permissions - TannerWeinacker/Tech-Journal GitHub Wiki

To add a user

  • useradd ‘name’

To add a group

  • groupadd ‘name’

To add a user to a group

  • usermod -aG ‘group name’ ‘name’

To become a different user

  • su - ‘name’

To change group owner

  • chgrp ‘name’ ‘directory’

To change group permissions

  • use chmod g+-w /’directory’ (the g+w if for adding write)
  • G - is for group
  • O - is for other
  • U - is for user
  • W - write
  • R - Read
  • X - Executable

How to read the file permissions

  • Directory + User + Group + Other

IF you want to see what group the user is in

  • id