# Linux Users, Permissions and Processes

> Understand how Linux decides who can do what: users, groups, file modes, sudo, SUID, processes and scheduled jobs. Free notes, key concepts, resources and a...

Canonical: https://www.internhack.in/roadmaps/tracks/cybersecurity/linux-permissions-processes
Last updated: 2026-11-28

Understand how Linux decides who can do what: users, groups, file modes, sudo, SUID, processes and scheduled jobs.

Beginner · about 6 hours · difficulty 2/5

Learn first: [Linux Command Line Essentials](https://www.internhack.in/roadmaps/tracks/cybersecurity/linux-cli)

Nearly every Linux attack and defense comes down to **permissions**. Once you understand them, privilege escalation and hardening both make sense.

### Users and groups

Accounts live in `/etc/passwd`; password hashes in `/etc/shadow` (readable only by root). Each user has a UID; root is UID 0. Groups grant shared access, and membership in groups like `sudo`, `docker` or `adm` can be as powerful as root.

### File permissions

`ls -l` shows modes like `-rwxr-x---`: read, write, execute for owner, group and others. `chmod 640 file` and `chown user:group file` change them. Special bits matter for security:

- **SUID** on an executable runs it as the file's owner (often root). A misconfigured SUID binary is a classic escalation path.
- **Sticky bit** on `/tmp` stops users deleting each other's files.

### sudo

`sudo -l` lists what the current user may run as root. An entry like "may run `vim` as root" is effectively full root, because vim can spawn a shell.

### Processes, services and scheduling

`ps aux`, `top` and `/proc` show what is running and as whom. Services run under systemd. Scheduled jobs live in cron (`/etc/crontab`, `/etc/cron.d`) and systemd timers. Attackers love writable scripts that root runs on a schedule; defenders audit exactly those.

### Pitfalls

- `chmod 777` to "fix" a problem. It creates new ones.
- Forgetting that group membership (like `docker`) can equal root.

Move on when you can look at a box and list every way a normal user might become root, and how to close each one.

## Key concepts

- **/etc/passwd and /etc/shadow**
- **File modes and chmod/chown**
- **SUID, SGID and sticky bit**
- **sudo and sudoers**
- **Processes and /proc**
- **cron and systemd timers**
- **Capabilities (setcap)**

## Mini project

In a VM, deliberately create three misconfigurations (a SUID binary, a writable root cron script, a loose sudo rule), then write a short script that detects each one.

## Check yourself

Why is a user in the docker group effectively root on most hosts?

## Free resources

- [GTFOBins](https://gtfobins.github.io/) (GTFOBins)
- [Linux Journey: Permissions](https://linuxjourney.com/) (Linux Journey)
- [Linux man pages](https://man7.org/linux/man-pages/) (man7.org)

Previous: [Linux Command Line Essentials](https://www.internhack.in/roadmaps/tracks/cybersecurity/linux-cli) · Next: [Windows Internals for Defenders](https://www.internhack.in/roadmaps/tracks/cybersecurity/windows-fundamentals)

## More in Operating Systems for Security

- [Linux Command Line Essentials](https://www.internhack.in/roadmaps/tracks/cybersecurity/linux-cli)
- [Linux Users, Permissions and Processes](https://www.internhack.in/roadmaps/tracks/cybersecurity/linux-permissions-processes)
- [Windows Internals for Defenders](https://www.internhack.in/roadmaps/tracks/cybersecurity/windows-fundamentals)
- [Active Directory Fundamentals](https://www.internhack.in/roadmaps/tracks/cybersecurity/active-directory-basics)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Cybersecurity Roadmap](https://www.internhack.in/roadmaps/tracks/cybersecurity)
