File System · 4.4

File Protection

A file system must protect data from accidental or unauthorised access. Permissions and access-control rules decide what each user or process may do.

Permission checker

Toggle permissions in the table, then test an operation. The familiar UNIX-style order is owner, group and others.

SubjectreadwriteexecuteBits
ownerrwe
groupr--
othersr--

Current mode

rwe r-- r--

Equivalent to a compact permission display.

Test access

Access denied: group may not write this file.

Protection concepts
Authentication — Verifies who the user or process is, such as with a password or identity token.
Authorisation — Checks what an authenticated subject is allowed to do with a resource.
Access control — A policy and enforcement mechanism that protects files, folders and devices.

Real-world analogy: A locked workshop

Authentication checks your identity at the door. Authorisation checks your assigned badge, and the access-control mechanism keeps the tools and rooms restricted according to that badge.
Quick quiz

1. What does the write permission allow?

2. Which check answers “who are you?”