Consist of:
Other items can be seen in /etc/passwd
/etc/passwd
cat /etc/group
/etc/shadow
/etc/group
/etc/skel
read = r = 4 (view)
write = w = 2 (modify)
execute = x = 1 (run)
Examples?
Mode layers:
Each mode can be set for r,w,x
If a process wants to read, it will be allowed if the UID matches and user-read is set, or if GID matches and group-read is set, or if other read is set. Same for write and execute.
In addition to other bits:
ls -l /usr/bin/passwd
Why the difference between s and S when setting SetUID or SetGID bits? If the file is NOT executable, you have S, otherwise s.
s
S
Each process has a mask that defines permission bits that should be removed from newly created files and directories.
Umask inherited from parent process. Processes can change their umask with a system call. Shell usually gets default umask from a shell init file.
kahoot