Chapter 13 · SimulationPermissions Lab? ← Chapter 13 File Directory Read Write Execute Role Owner Group Other umask Matrix Owner Group User Groups Modes 644 755 600 044 4755 1777 Speed 2/sOctalchmod 644 file.txtumask permissions of new files / directories 022 027 033 077File: 666 & ~umaskApplyDirectory: 777 & ~umaskApply Mode 0644 Class – Needed – Result – Step 0/0 ClosePermissions LabHow does a Unix kernel decide whether a user may read, write or execute a file or directory? The access check based on the permission bits (rwx for owner, group and others, plus setuid, setgid and sticky) and the first-match rule is shown step by step on a flowchart.UsageChoose the object type (File / Directory) and the operation; the Role buttons fill the user field with the owner, a group member or an unrelated user.The owner, the file’s group, the requesting user and the user’s groups (comma-separated) can be edited directly.Toggle the bits in the grid, type an octal mode, or pick a preset Modes value. Every change replays the check; use the playback buttons to follow it step by step.umask opens the umask calculator (permissions of new files and directories; Apply loads the result into the grid). Matrix shows what each class can do.RulesFirst matchIs the user the owner? The owner bits are used. If not, is the user in the group? The group bits. Otherwise the others’ bits.r w x4 + 2 + 1 in each class’s digit.Directory rList the names.Directory wCreate, delete, rename entries; needs both w and x.Directory xSearch / traverse (cd, access files by name).setuid4xxx: the program runs with the owner’s identity (s/S in the owner’s x position).setgid2xxx: the program runs with the group’s identity; directories pass their group on to new entries.sticky1xxx: in a directory each user can delete only their own files (t/T).umaskBits cleared from 666 / 777 (masking, not subtraction).ScopeOrdinary users only: no root, ACLs or parent-directory path checks.Legend class in use required bit is set required bit is missing ✓ allowed✗ deniedKeys←→ stepSpace replayHomeEnd first / lastEsc close