Linux File Permissions - C-Crawford/connor-tj-sys GitHub Wiki
NOTE: Most commands below require sudo access.
How to create groups:
- mkgrp [group name]
- Optional: Create a directory for the group
-
- mkdir /[group name]
How to add user to group:
- usermod -aG [group name] [username]
Assign file to group:
- chgrp [group] [file]
Assign file to owner:
- chown [user] [file]
Adjust rwx directory:
- chmod [number] [file]
Read (4), Write (2), eXecute (1)
Add together (ex: 6 = Read + Write)
Owner first, then group, then user