DEPARTMENT OF COMPUTING

Users and Groups


Administration


User accounts


Group Accounts


Primary group vs other Group membership


Review


Review


Command review

Command Command
passwd chfn
chsh umask
id groups
who finger

Command review

Command ~
adduser addgroup
chmod chgrp
chown ~

Permissions review (Files)


Permissions review (Directories)


Permissions review

Mode layers:

Each mode can be set for r,w,x


Permissions

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.


Special Permissions

In addition to other bits:


SetUID


SetGID


Sticky Bit


Full file mode examples


Tidbit

Why the difference between s and S when setting SetUID or SetGID bits? If the file is NOT executable, you have S, otherwise s.


Umask

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

kahoot

Last Updated 05/08/2023