What are Linux capabilities?
AdvancedConceptPermissions, Users & sudo
Answer
Capabilities split root's power into ~40 units, so a program can get only what it needs: CAP_NET_BIND_SERVICE (bind ports below 1024), CAP_NET_ADMIN, CAP_SYS_ADMIN (very broad), CAP_CHOWN, etc.
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/myapp
getcap /usr/local/bin/myapp
getpcaps $(pgrep -o nginx)
In systemd: AmbientCapabilities=CAP_NET_BIND_SERVICE. This is how ping works without SUID on modern distros.
More on Permissions, Users & sudo
Explain the rwx permission model for files and directories.BeginnerHow does octal notation work in chmod?BeginnerWhat does chown do and who can run it?IntermediateWhat is umask and how is the final permission calculated?IntermediateWhat is SUID and give a real example?IntermediateWhat does SGID do on files versus directories?Intermediate