Linux Permission
# File Permission
The permissions consist of three groupings: what the owner of the file can do to it, what someone in a group can do to the file, and finally, what anyone (sometimes referred to as other) can do.
# chown
Change the owner of file.user:group
# chmod
Change file permissionchmod permissions filename
There are 2 ways to use the command –
- Absolute mode
- Symbolic mode
Use mask to get the result. Maximum is 111, the left-most bit is read, middle bit is write, right-most bit is execute.
- The read bit adds 4 to its total (in binary 100),
- The write bit adds 2 to its total (in binary 010), and
- The execute bit adds 1 to its total (in binary 001).
# Sudo Group
# Adding User to the sudo Group
usermod -aG sudo username