3. Access Control#
This chapter introduces Unix access control: users, groups, permissions, defaults, and environment settings that shape secure command-line work.
Identity: Connect users, groups, UIDs, and GIDs to filesystem access decisions.
Permissions: Read symbolic and octal permission forms and change them deliberately.
Defaults: Use
umaskto reason about permissions assigned to new files.Privilege: Recognize when elevated access is needed and when it is risky.
Environment security: Treat
PATHand environment variables as part of a system’s trust boundary.
Chapter Video
How to Modify File Permissions in Bash (9:41) by Microsoft Developer
Hosted on YouTube; property of its original creator, embedded here for educational reference only.
Learning Objectives
By the end of this chapter, you will be able to:
Explain how users, groups, and privileges identify access rights.
Read and change symbolic and octal file permissions.
Use
umaskto reason about default permissions.
Chapter Flow
Glossary
# |
Term |
Explanation |
|---|---|---|
1 |
User |
An account identity used to own files and run processes. |
2 |
UID |
A numeric user identifier used internally by Unix-like systems. |
3 |
Group |
A collection of users that can share file access. |
4 |
GID |
A numeric group identifier used internally by the system. |
5 |
Root |
The superuser account with administrative privileges. |
6 |
|
A command that runs another command with elevated privileges when authorized. |
7 |
Owner |
The user account associated with a file or directory. |
8 |
Group owner |
The group associated with a file or directory. |
9 |
Permission bits |
The read, write, and execute settings stored for a file. |
10 |
Read permission |
Permission to inspect file contents or list a directory. |
11 |
Write permission |
Permission to modify a file or change entries in a directory. |
12 |
Execute permission |
Permission to run a file as a program or traverse a directory. |
13 |
|
The command used to change file permissions. |
14 |
|
The command used to change file ownership. |
15 |
|
The command used to change group ownership. |
16 |
Octal notation |
A numeric permission form such as |
17 |
Symbolic mode |
A permission form such as |
18 |
|
A mask that removes permissions from newly created files and directories. |
19 |
Special permissions |
Permission bits such as setuid, setgid, and sticky bit. |
20 |
PATH security |
The risk that command lookup can run an unintended program. |