Level 0 · Module 2

Users and permissions

Understand how identities and access rules protect operating-system resources.

Difficulty
beginner
Time
10 min read
Reading progress0% read

Not completed

By the end, you can

  • Distinguish authentication, identity, and authorization.
  • Explain owner, group, and other permission classes.
  • Apply least privilege to a file-access scenario.

Summary

Operating systems associate processes with identities and check permissions before allowing access. Least privilege means granting only the access needed for a task.

Introduction

Several people and background services can share one computer. The OS needs to know who a process represents and which resources that identity may use.

Explanation

Authentication establishes an identity; authorization decides what that identity may do. On Unix-like systems, a file commonly has an owner, a group, and permissions for everyone else. Read, write, and execute have different meanings depending on whether the target is a regular file or directory. Administrative identities can perform powerful operations and should be used carefully.

Real-world example

A shared report

A team gives its group read access to report.txt, while only the owner can edit it. Other users receive no access. The rule supports collaboration without making the file writable by everyone.

Read a permission display

permissions.txttext
-rw-r-----  lee  writers  report.txt
||| ||| |||
owner group other
rw-   r--   ---

Code example

inspect-permissions.shbash
ls -l report.txt
# owner may read/write; group may read; others have no access
chmod 640 report.txt

Common mistakes

  • Confusing authentication with authorization.
  • Giving every user administrative access to avoid permission errors.
  • Assuming read, write, and execute mean exactly the same thing for files and directories.

Quiz

Knowledge check

A report should be editable by its owner, readable by its group, and unavailable to others. Which policy matches?

Try it

Apply least privilege

Design permissions for a deployment script that one administrator may edit, a deployment group may run, and everyone else must not access.

Key takeaways

  • Authentication identifies; authorization permits or denies actions.
  • Operating systems check a process identity against resource permissions.
  • Least privilege limits both accidents and abuse.
View module overview