Lab04 File Permissions - nicholaslamon/SYS255 GitHub Wiki

This lab was about setting up file permissions in Linux. It was relatively tedious just because working out of a console is something of the past (God bless GUIs) but it wasn't a hard concept to understand. It was a lot of swapping between users and creating files and then editing those files as either the original owner or as root.

The biggest takeways are the commands:

  • groupadd () - creates a group with the specified name.
  • useradd () - creates a user with the specified name.
  • usermod -aG () [] - adds a user () to a specified group [].
  • chgrp - changes the group designation of a file/directory.
  • chmod - edits the permissions of a file/directory.

For the chmod command, you can use the extension of g to change the group permissions of a file/directory or o to change the other permissions. To add permissions to a group (for example) you use chmod g+rwx which would give that group read, write, and execute permissions on that file/directory. To remove permissions, you simply use - instead of +.

A screenshot of the file permissions of two directories:

fileperms