Users, permissions, and host security: modes, special bits, capabilities, sudo, SSH, and audit

Least privilege at every layer, verified by audit: modes decide reads, capabilities hand out slices of root, sudo rules are root shells in disguise, and auditd shipped off-host is what makes any of it provable.

Read the briefing
About 4 min to read 12 drills

What to remember

  1. Directory execute is traversal; read only lists names. You need x to open anything inside — which is why 'x without r' is a real and useful mode.
  2. Any editor or pager in a sudo rule is a root shell. vim :!sh, less !sh. Use sudoedit or a fixed-argument wrapper, and read every rule as an attacker would.
  3. CAP_NET_BIND_SERVICE beats running as root. One capability for one need. CAP_SYS_ADMIN is effectively root, so it is not a compromise.
  4. Agent forwarding to a bastion hands your identity to its root. Use ProxyJump so your agent never leaves your laptop.
  5. setgid on a directory makes new files inherit its group. Mode 2775 plus a 002 umask is the correct answer for a shared team directory.

The big picture

Host security questions in SRE loops are practical: who can do what on a machine, how a service binds a privileged port without running as root, why a sudo rule is a root shell in disguise, how SSH is configured for a fleet, and how you would know that any of it changed. On validator and RPC hosts, where a key file is worth real money, these are the questions that matter most.

The mental model

Least privilege at every layer, verified by audit. File modes decide who reads and executes; special bits and capabilities hand out slices of root; sudo defines who may become root and how; SSH decides who reaches the host at all; auditd records what actually happened. For every rule ask two things: what is the smallest grant that works, and how would I detect it being abused.

Diagrams

Reading a mode, and why directories differ
   -   rwx   r-x   r--
   ^    ^     ^     ^
   |    |     |     +--- other
   |    |     +--------- group
   |    +--------------- owner
   +-------------------- type:  -  file   d  dir   l  link

        r = 4    w = 2    x = 1        rwx r-x r-- = 754

On a DIRECTORY the same bits mean something else:
   r   list the names inside
   x   traverse it / reach anything by name   <- breaks most
   w   create and delete entries              <- not the file's

namei -l /path/to/file  walks every component and shows you
which one is actually refusing.

In depth

Modes, umask, and the special bits

Modes are three triplets (owner, group, other) of read/write/execute. On a directory, r lets you list names, x lets you traverse into it and stat entries, w (with x) lets you create, rename, and delete entries regardless of the entries' own modes. umask subtracts default bits from new files (022 gives 644/755; 027 is the hardened default that stops others reading). The special bits: setuid on an executable runs it as the file's owner (how passwd edits /etc/shadow); setgid on an executable runs as the group, and on a directory makes new files inherit the directory's group, which is the right tool for shared team directories; the sticky bit on a directory (/tmp) lets only the owner delete their files. Audit setuid binaries (find / -perm -4000) and keep the list short; a setuid shell script is ignored by the kernel for a reason.

Capabilities and sudo

Capabilities split root into ~40 privileges: CAP_NET_BIND_SERVICE (bind ports < 1024), CAP_NET_ADMIN, CAP_SYS_PTRACE, CAP_CHOWN, CAP_DAC_OVERRIDE (bypass file permissions), CAP_SYS_ADMIN (so broad it is effectively root). Grant them per file (setcap cap_net_bind_service=+ep /usr/bin/svc), per service (AmbientCapabilities= and CapabilityBoundingSet= in systemd), or per container (runtimes drop most by default; --cap-add is a security review item). A non-root service binding 443 needs one capability, not root; alternatively set net.ipv4.ip_unprivileged_port_start=443.

sudo is configured in /etc/sudoers and /etc/sudoers.d/ via visudo (syntax-checks before saving). Rules name who, on which hosts, may run what as whom, optionally NOPASSWD. Command allow-lists are weaker than they look: any editor, pager, or interpreter (vim, less, python, find -exec, tar --checkpoint-action) offers a shell escape, and wildcards in paths allow .. traversal. Use sudoedit for files, wrapper scripts with fixed arguments for commands, and log to a central place (Defaults logfile, log_output, or ship auth logs). sudo -l shows what a user may run; read it as an attacker would.

SSH for a fleet, and auditd

sshd_config baseline: PermitRootLogin no, PasswordAuthentication no, PubkeyAuthentication yes, AllowGroups (or AllowUsers) to a small set, X11Forwarding no, MaxAuthTries low, LoginGraceTime short, and a Match block for the deploy user. Keys: ~/.ssh 700, authorized_keys 600, ed25519, and rotation. Fleets should move from per-user authorized_keys to SSH certificates (TrustedUserCAKeys), issued short-lived by an SSO-backed CA, so access is revoked by expiry and there is no key sprawl. Reach hosts through a bastion with ProxyJump, never with agent forwarding to the bastion (root on the bastion can use your forwarded agent). Host keys should be pinned or certified too, so "host key changed" is a signal and not noise.

auditd records syscalls and file access per rule: -w /etc/sudoers -p wa -k sudoers, -w /home/sol/keys -p rwa -k keys, -a always,exit -F arch=b64 -S execve -F euid=0 -k rootcmds. Query with ausearch -k keys and summarize with aureport. Ship the log off-host immediately; an attacker with root can edit local logs. Pair it with file-integrity monitoring and an inventory of who has access, reviewed on a schedule.

Myths and facts

Myth: Read permission on a directory lets you open the files inside.

Fact: You need execute (traverse) on the directory to reach entries; read lists names only.

Myth: A sudo rule allowing only 'vim /etc/app/config' is safe.

Fact: vim has :!sh; editors, pagers, and interpreters are root shells. Use sudoedit or a fixed wrapper.

Myth: Running as root inside a container is fine because containers isolate.

Fact: Root in a container is root on the host for any escape; drop capabilities, use a non-root user, and read-only filesystems.

Myth: SSH agent forwarding is a safe way to hop through a bastion.

Fact: Root on the bastion can use your forwarded agent to authenticate as you; use ProxyJump instead.

Myth: setuid on a shell script gives it root.

Fact: The kernel ignores setuid on interpreted scripts; use a compiled wrapper, capabilities, or sudo.

How pros do it

  • Run services as dedicated non-root users with the one or two capabilities they need; audit setuid binaries.
  • Use setgid directories plus a tight umask for shared paths; never chmod 777 to make something work.
  • Write sudo rules with sudoedit and fixed-argument wrappers; review sudo -l output as an attacker.
  • Fleet SSH: certificates from an SSO-backed CA, ProxyJump bastions, no passwords, no root login, host key pinning.
  • auditd rules on sudoers, key material, and root execve, shipped off-host, with periodic access reviews.

Questions people ask

My service needs port 443 but must not run as root. Options?

Give it the one capability that gates the port: AmbientCapabilities=CAP_NET_BIND_SERVICE in the unit (with CapabilityBoundingSet= tightened) is the cleanest; setcap cap_net_bind_service=+ep on the binary works but is lost on upgrade and applies to anyone who runs it; net.ipv4.ip_unprivileged_port_start=443 lowers the privileged range for the whole host. The caveat: the best answer is often not to bind 443 at all and let a proxy or load balancer own the privileged port.

How do I let a team share a directory so everyone can edit everyone's files?

Group ownership plus mode 2775: the setgid bit makes new files inherit the directory's group, and a umask of 002 for members keeps them group-writable. Reach for ACLs (setfacl -d for defaults) when the rules are finer than owner, group and other. The caveat: files copied in with cp -p or created by tools that force a mode still need fixing, so a default ACL is the more robust version of the same idea.

How do I see who ran what with sudo?

The auth journal first (journalctl _COMM=sudo), which records the user, TTY, command and runas user for every invocation; sudo's own logfile or log_output sessions if enabled; and auditd rules on execve keyed by auid for the person behind the escalation. Ship all of it off-host, because root can edit local logs. The caveat: a sudo rule that hands out a shell (vim, less, an interpreter) logs one command and then goes dark, which is why rule design matters more than logging.

Why is PasswordAuthentication no not enough to stop brute force?

It closes one method; the others stay open. Also set KbdInteractiveAuthentication no (PAM can still prompt otherwise), PermitRootLogin no, and AllowGroups to a small set, then rate-limit or firewall port 22 so the noise stops. The caveat: in sshd_config the first value of a keyword wins, so a hardening line placed after an Include or below a Match block may not be the one in effect; check with sshd -T.

What should be different on a validator host?

Treat the key file as the asset: readable only by the service user, auditd watches on the key directory, no interactive logins except through a bastion with per-person certificates, and alerts on any change to sudoers, keys or the unit. The caveat: shared or CI credentials on such a host make attribution impossible, which turns every alert into an incident.

Further reading

Drills · 12

Answer in your head, or out loud, before you reveal. Mark each one: "Again" brings it back, "Got it" counts on your desk.

1 Pick the strongest answer

What does the execute bit mean on a directory, as opposed to a file?

  1. It means the files inside the directory are executable. Permissions do not propagate; each file carries its own mode.
  2. It allows creating new files inside the directory. Creating and deleting entries requires the write bit on the directory, plus x to reach it.
  3. It grants the right to traverse the directory — to reach anything inside it by name. Without it you cannot even stat a file whose full path you already know, though with read you could still list the names. On directories, x is search permission; r is the right to list names. They are genuinely independent.
  4. It is meaningless on directories and ignored by the kernel. It is the single most important bit on a directory: without it the directory is unusable.
In short

On a folder, x means you may go inside it, and without it you cannot open a file even when you know its exact name.

Why

Directory permissions come up constantly in real debugging — a deploy that cannot read a config four levels down usually fails on a missing x somewhere in the path, not on the file's own mode. namei -l /path/to/file walks the whole chain and shows you exactly where it breaks.

The common mistake

Changing the file's mode. If the missing bit is on a folder above it, the file's own permissions were never the problem.

Read the docs

2 Pick the strongest answer

A service must listen on port 443 and must not run as root. Which is the most precise fix?

  1. Run as root and drop to a user after binding. Works but requires the code to handle privilege dropping correctly; a capability is simpler and narrower.
  2. Grant CAP_NET_BIND_SERVICE to the service (systemd AmbientCapabilities=CAP_NET_BIND_SERVICE with CapabilityBoundingSet restricted), so it binds the privileged port with no other root privilege. One capability for one need; the bounding set prevents escalation.
  3. Grant CAP_SYS_ADMIN. CAP_SYS_ADMIN is effectively root.
  4. chmod 4755 the binary. setuid root gives the whole process root; far broader than needed.
In short

Give the service only CAP_NET_BIND_SERVICE through systemd AmbientCapabilities=, so it can bind port 443 with no other root power.

Why

Capabilities are root split into pieces; port binding is one piece. setcap cap_net_bind_service=+ep on the binary also works but is lost on upgrade and applies to anyone running it; the systemd directive is scoped to the service. A proxy on 443 forwarding to an unprivileged port is the other clean pattern.

The common mistake

Reaching for setuid root or CAP_SYS_ADMIN. Both hand the process far more than a port, and CAP_SYS_ADMIN is root by another name.

Read the docs

3 Read the output

The intent was 'deploy may edit app config, restart app, and read app logs'. What can deploy actually do?

$ sudo -l
User deploy may run the following commands on rpc-07:
    (root) NOPASSWD: /usr/bin/vim /etc/app/*
    (root) NOPASSWD: /usr/bin/systemctl restart app
    (root) NOPASSWD: /usr/bin/less /var/log/app/*
  1. Become root: vim (:!bash or :shell) and less (!bash) both spawn shells as root, and the wildcard allows /etc/app/../../etc/sudoers. Only the systemctl line is as narrow as intended. Editors and pagers are interactive programs with shell escapes; wildcards permit traversal.
  2. Edit config and restart, but less is harmless. less has ! for shell commands and :e to open other files as root.
  3. Exactly what was intended. sudo restricts the command, not what the command can do once running as root.
  4. Nothing without a password because NOPASSWD only applies to the first rule. Each rule carries its own tag; all three are NOPASSWD.
In short

deploy can become root, because vim and less both have shell escapes and the wildcard allows .. traversal; only the systemctl line is safe.

Why

The fix is sudoedit /etc/app/* (edits a copy as the user and installs it as root, no shell), a wrapper script that runs a fixed journalctl -u app or cat of a specific path, and keeping the exact-argument systemctl rule. Read every sudo rule as 'what is the worst this program can do as root'.

The common mistake

Judging a rule by the command's name. sudo restricts what starts, not what the program can do once it is root.

Read the docs

4 Pick the strongest answer

/srv/uploads/report.pdf is -rw-r--r-- root root, inside /srv/uploads, which is drwxrwxr-x root www. A user in group www runs rm /srv/uploads/report.pdf. Does it succeed, and why?

  1. Yes, but only because the file is world-readable. Read permission on the file has nothing to do with removing its name.
  2. No: only root can delete a file owned by root. Ownership of the file matters only under the sticky bit; without it, anyone who can write the directory can remove any entry in it.
  3. Yes. Deleting a file is a write to the directory (removing an entry), so it needs write plus execute on /srv/uploads, which the group has; the file's own mode is irrelevant. Only the sticky bit on the directory, as on /tmp, would restrict deletion to the file's owner. unlink modifies the directory's entries, not the file's data; the permission check is on the directory.
  4. No: you need write permission on the file itself to delete it. rm may ask about a write-protected file when interactive, but the kernel's check is on the directory; the file's mode never enters into unlink.
In short

Yes: deleting a file needs write and execute on the directory, not on the file, and only the sticky bit would stop it.

Why

unlink() is a directory operation. The strong answer says so in one sentence, names the sticky bit as the exception, and adds that rename and create follow the same rule; that mechanism is what interviewers are checking, rather than the mode table.

Read the docs

5 Read the output

Which file needs its mode changed, and to what?

$ ssh -i ~/.ssh/deploy_key deploy@web-3
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/ci/.ssh/deploy_key' are too open.

$ ls -l ~/.ssh/
-rw-r--r--  1 ci ci  2610 Sep  2 09:41 deploy_key
-rw-r--r--  1 ci ci   573 Sep  2 09:41 deploy_key.pub
  1. The ~/.ssh directory, to 777, so ssh can traverse it. That makes the problem far worse; ~/.ssh should be 700.
  2. The private key only: chmod 600 ~/.ssh/deploy_key. The .pub file is public by design and 644 is correct for it. ssh refuses to use a private key that other local users could read; the public half has nothing to protect.
  3. Neither; pass -o StrictModes=no to bypass the check. StrictModes is a server-side option and does not govern the client's own key check; disabling a safety check is the wrong instinct anyway.
  4. Both files, to 600 — anything in ~/.ssh must be owner-only. Harmless but wrong-headed; the public key is meant to be readable and tightening it fixes nothing.
In short

Only the private key: chmod 600 ~/.ssh/deploy_key; the .pub file is meant to be readable.

Why

This appears in interviews as "you cannot ssh in, walk me through it" and the strong answer covers both ends: client key modes and server-side StrictModes on the home directory, with the server log as the source of truth.

Read the docs

6 Pick the strongest answer

You are root inside a container (id says uid=0) and ip link set eth0 mtu 1400 fails with RTNETLINK answers: Operation not permitted. Why does root get EPERM, and what is the least-privilege fix?

  1. Root in a container is uid 0 with a reduced capability set: the runtime drops CAP_NET_ADMIN (along with CAP_SYS_ADMIN, CAP_SYS_PTRACE and most others), and changing an interface is a CAP_NET_ADMIN check, not a uid check. Confirm with CapEff in /proc/self/status decoded by capsh --decode, and add back that one capability (--cap-add NET_ADMIN, or securityContext.capabilities.add) rather than running privileged. Capability checks are what stand between uid 0 and privileged operations; the runtime's default bounding set is what makes container root safe.
  2. The container maps root to an unprivileged user, so run the command with sudo. sudo cannot grant a capability that the process tree's bounding set lacks, and most containers do not use a user namespace at all: uid 0 is uid 0, minus capabilities.
  3. eth0 belongs to the host, and only the host's network stack may change it. The interface lives in the container's own network namespace; the check that failed is a capability check inside that namespace.
  4. Run the container with --privileged; it is the standard way to allow network configuration. Privileged hands over every capability and every device and disables most of the sandbox; one missing capability calls for adding one capability.
In short

Container root is uid 0 without CAP_NET_ADMIN, and changing an interface is a capability check; add back that one capability instead of running privileged.

Why

'Root in a container is not root' is a sentence interviewers want justified with a mechanism, and capabilities are that mechanism. The strong answer names the check, reads CapEff to prove it, and adds one capability rather than escalating to privileged.

Read the docs

7 Scenario: what do you do next?

After a routine change, a batch job running as the reports user fails with Permission denied opening /srv/data/exports/daily.csv. The file itself is -rw-rw-r-- root reports, so the group should be able to read it. The job worked yesterday.

Step 1. The file mode looks correct. Where do you look?

  1. The whole path, not just the file — every directory from / down needs execute for the process to traverse it. namei -l /srv/data/exports/daily.csv shows the mode and owner of each component and finds the broken link in one command. A correct file mode behind a directory missing +x fails exactly like this, and it is the most common cause of a mysterious overnight breakage.
  2. Add the reports user to the root group. An enormous privilege grant to solve a traversal problem, and it may still not fix it.
  3. chmod 777 the file and move on. It will not even fix it if the problem is a parent directory, and it leaves a world-writable data file behind.
  4. Assume the file is corrupt and regenerate it. Permission denied is an access error, not a data error.

Step 2. namei -l shows /srv/data is now drwxr-x--- root root. Someone tightened it. What is the right fix?

  1. Give the traversal right deliberately — make /srv/data group-owned by a group the reports user is in, or grant the minimum with an ACL (setfacl -m g:reports:rx /srv/data) — and record why, so the next tightening pass does not undo it. It restores exactly the access needed, at the directory that broke, with the reason attached.
  2. Copy the file to /tmp before reading it. Whatever copies it needs the same traversal right, so this just moves the failure.
  3. Run the batch job as root instead. Escalating the job's privilege to avoid a permissions conversation is how services end up running as root permanently.
  4. Revert the directory to 755 without discussion. It works, but it silently undoes a deliberate hardening change; at minimum this needs to go back to whoever made it.

Step 3. What prevents the next one?

  1. Disable SELinux. Nothing here points at SELinux; this is a discretionary-permissions problem, and turning off a security layer on a hunch is a bad habit.
  2. Give the reports user sudo so it can always read anything. It converts a permissions bug into an unlimited privilege grant.
  3. Put the permissions on the data paths under configuration management so they are reviewed and reproducible, and have the batch job check its access at start-up and fail loudly with the path rather than at the first read. Reviewable intent plus a fast, precise failure — the two things that were missing overnight.
In short

Check the whole path with namei -l: /srv/data lost its execute bit for the reports user, so grant traversal with a group or an ACL and put the permissions under configuration management.

Why

The heart of this is that permission errors are about the path, not the file. Candidates who jump straight to chmod on the file, or who reach for SELinux before checking traversal, show they have not debugged many of these.

Read the docs

8 Find what's broken

This is the internet-facing bastion. Three lines fail a security review. Which, and why?

# /etc/ssh/sshd_config (bastion host)
Port 22
PermitRootLogin yes
PasswordAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
X11Forwarding no
AllowAgentForwarding yes
MaxAuthTries 6
LoginGraceTime 2m
ClientAliveInterval 300
ClientAliveCountMax 2
AllowGroups ops
Subsystem sftp /usr/lib/openssh/sftp-server
In short

Lines 3, 4 and 8: root login, password authentication and agent forwarding must all be off on an internet-facing bastion.

What's broken
  • Line 3: Root login over SSH is enabled on an internet-facing host.
  • Line 4: Password authentication is enabled, exposing accounts to credential guessing and reuse.
  • Line 8: Agent forwarding to the bastion lets anyone with root on the bastion use connected users' agents to authenticate onward as them.
Why

The remaining settings are reasonable: X11 forwarding is off, MaxAuthTries 6 is the default and fine with keys, AllowGroups ops restricts who may log in, and the keepalive settings are ordinary. The three faults are the classic bastion mistakes, and the agent-forwarding one is the least understood.

Read the docs

9 Scenario: what do you do next?

File-integrity monitoring alerts that /etc/sudoers.d/ops on a validator host changed at 02:41. Nobody has a change ticket. The validator is running normally and the identity key file's checksum is unchanged.

Step 1. First move?

  1. Revert the file and close the alert. Removes the evidence and leaves whoever did it with access.
  2. Assume an engineer did it and ask in chat tomorrow. Unexplained privilege changes on a key-holding host are an incident until proven otherwise.
  3. Reboot the validator to clear any malware. Destroys volatile evidence and causes downtime for a hypothesis.
  4. Treat it as a potential compromise: preserve evidence (copy the file and its metadata, ausearch -k sudoers and -k rootcmds around 02:41, journalctl _COMM=sshd _COMM=sudo --since 02:00, last -F), identify the session that made the change, and check what else that session did. Auditd and auth logs answer who, from where, and what else; preserving them comes before changing anything.

Step 2. auditd shows the write came from a sudo session by user deploy via SSH from an IP in the office range at 02:40; the added line grants deploy NOPASSWD ALL. deploy is a shared CI account whose key is in three pipelines. What now?

  1. It was from the office, so it was an engineer; ignore. Office IP plus shared key plus unauthorized root grant is not reassurance.
  2. Contain: revoke the deploy key everywhere, rotate any secret that session could have read, remove the sudoers line, and keep the host up while checking other hosts for the same change. Then find which pipeline or person used the key: CI logs, VPN logs for the source IP. Shared credentials mean you cannot yet attribute; revoke and rotate, then attribute with the other logs.
  3. Delete the deploy account immediately. Breaks deployments before you know the scope; revoke the key and remove the grant first.
  4. Rotate only the validator identity key. The identity key was unchanged; the credential that was used is the deploy key.

Step 3. It was an engineer using the shared CI key from a laptop to 'fix' something. Systemic fixes?

  1. Eliminate shared accounts: per-person SSH certificates from the SSO-backed CA with short lifetimes, CI with its own scoped identity and no interactive login, sudo rules with fixed commands, and auditd alerts on sudoers and key paths shipped off-host, plus a break-glass path that is logged. Attribution, least privilege, and detection all improve; the incident becomes impossible to repeat quietly.
  2. Write a policy forbidding use of the CI key. Policy without mechanism; the key still works.
  3. Remove sudo from all hosts. Operators need escalation; make it narrow and audited rather than absent.
In short

Preserve the audit and auth logs first, then revoke the shared deploy key and remove the sudoers grant, then replace shared accounts with per-person SSH certificates.

Why

Unexplained privilege changes on key-holding hosts are handled as incidents: preserve, attribute, contain, then remove the conditions (shared credentials, broad sudo, silent changes) that made the event both possible and ambiguous.

Read the docs

10 Answer out loud

Walk me through the host-access design for a fleet of 200 validator and RPC hosts operated by 12 engineers: how people reach hosts, how they escalate, how services get privileges, and how you would detect misuse. Five to seven sentences.

In short

A strong answer uses short-lived SSH certificates from an SSO-backed CA, ProxyJump bastions without agent forwarding, narrow sudo, services with only the capabilities they need, and auditd shipped off-host.

What a strong answer does
  • design: SSO-backed SSH CA with short-lived certificates, ProxyJump bastions (no agent forwarding), no passwords/root login, host certificates, sudo with fixed-argument wrappers and sudoedit, break-glass path, services as non-root with capabilities.
  • detection: auditd on sudoers/keys/root execve shipped off-host, FIM, alerts on grants and key access, periodic access reviews, session recording for break-glass.
  • tradeoffs: Names friction vs security, availability of the CA/SSO as a dependency, and how break-glass avoids lockout without becoming the default path.
Why

Staff answers make identity the control plane (certificates, not keys), remove shared credentials, scope escalation, and treat detection as part of the design rather than an afterthought.

11 Quick recall

Hardening baseline: which umask makes new files come out as 640 and new directories as 750?

In short

umask 027: it removes group write and all access for others, so files are 640 and directories 750.

Accepted

027 · 0027 · umask 027

Why

umask clears bits from the mode a program asks for: files are requested as 666 and directories as 777, and clearing 027 (write for group, everything for other) leaves 640 and 750. 022 is the common default (644 and 755); 027 is the hardened default in CIS-style baselines because it stops 'other' from reading anything new. It is worth being able to do this conversion without pausing.

Read the docs

12 Quick recall

Follow-up: which single capability lets a non-root process bind a port below 1024?

In short

CAP_NET_BIND_SERVICE lets a non-root process bind ports below 1024.

Accepted

CAP_NET_BIND_SERVICE · NET_BIND_SERVICE · cap_net_bind_service

Why

CAP_NET_BIND_SERVICE grants privileged-port binding without any other root privilege.

Next lesson Host networking: sockets, port exhaustion, conntrack, filtering, MTU, ARP, and packet capture
Drill · Users, permissions, and host security
0:00

Loading…