Whenever we create file or directory in unix, the kernel creates default set of permission by referring to its umask value.
- The default umask value is 002 used for normal user. Default file permission are 775 and default directory permission are 664.
- The default umask for root user is 022.
- For directory, base permission are 0777
- For file, base permission are 0666
- Userfull command are chmod, chown, umask
b) SGID: Set Group ID upon execution: This is a special type of permission given to a file. By default in Unix / Linux any program runs it inherits its access permission, properties and attributes from logged in user. When we set SGID to any directory, than all new files created under that directory takes permission, user, group from its parent directory.
If we set SGID to any command, than command runs with Group ID of group owner of the command instead GID of the user who executed it.
c) SUID: When SUID permission is set to any command, than command will always executes with the user ID of its owner, instead of the user who executes.
d) Sticky Bit: If we set sticky bit to particular directory, only owner (root) of the directory can delete the files. No other user is able to delete the file even though they have write permission.
e) Access Control List: ACL is Special permission in Linux, where administrator able to have more control over the file.