GETCAP(8)
๐ getcap ๐
okay bestie, this is the manual page for getcap, the System Manager's Manual entry, and it's giving "check your file's powers" energy ๐โจ
โจ NAME โจ
getcap โ examine file capabilities ๐ฆ
๐ธ SYNOPSIS ๐ธ
getcap [-v] [-n] [-r] [-h] filename [ ... ]
๐ DESCRIPTION ๐
okay so getcap is the tool that shows you the name and capabilities of each file you hand it. literally just point it at a file and it spills the tea on what powers that file has ๐ซถ
๐ OPTIONS ๐
-hโ prints quick usage ๐-nโ prints any non-zero user namespace root user ID value that's attached to a file's capabilities ๐ง-rโ turns on recursive search ๐-vโ displays all the searched entries, even the ones that have no file-capabilities ๐- filename โ one file per line ๐
โ ๏ธ NOTE: an empty value of=is NOT the same as an omitted (or removed) capability on a file, bestie. this matters most for the Ambient capability vector ๐ญ a process with Ambient capabilities will lose them when it executes a file that has=capabilities, but it will keep the Ambient inheritance of privilege when it executes a file with an omitted file capability. so this special empty setting can be used to stop a binary from running with privilege ๐ the kernel honored this suppression for root executing the file for a while, but after a number of years the kernel developers decided this was unexpected for the superuser and reverted it just for that user identity ๐ suppression of root privilege for a process tree is still possible using the--modeoption ofcapsh(1)๐
๐ซถ REPORTING BUGS ๐ซถ
ngl if something's broken, report it here, periodt ๐
https://bugzilla.kernel.org/buglist.cgi?component=libcap&list_id=1090757
๐ SEE ALSO ๐
capsh(1), cap_get_file(3), cap_to_text(3), capabilities(7), user_namespaces(7), captree(8), getpcaps(8) and setcap(8) โจ
that's the whole tea, bestie! ๐ it's the 2021-08-29 GETCAP(8) page from the System Manager's Manual, and you're literally iconic for reading it ๐๐
๐ฆ where this page comes from
- alpine 3.22: libcap-doc 2.78-r0 ยท BSD-3-Clause OR GPL-2.0-only
- alpine 3.23: libcap-doc 2.78-r0 ยท BSD-3-Clause OR GPL-2.0-only
- alpine 3.24: libcap-doc 2.78-r0 ยท BSD-3-Clause OR GPL-2.0-only
- arch rolling: libcap 2.78-1 ยท BSD-3-Clause OR GPL-2.0-only
- debian trixie: libcap2-bin 1:2.75-10+deb13u1+b3 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 43: libcap 2.76-3.fc43 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 43: libcap 2.76-3.fc43 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 43: libcap 2.76-4.fc43 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 43: libcap 2.76-4.fc43 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 44: libcap 2.77-2.fc44 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 44: libcap 2.77-2.fc44 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 44: libcap 2.78-1.fc44 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 44: libcap 2.78-1.fc44 ยท BSD-3-Clause OR GPL-2.0-only
- nixpkgs unstable: libcap 2.78
- opensuse-leap 16.0: libcap-progs 2.73-160000.3.1 ยท BSD-3-Clause OR GPL-2.0-only
- opensuse-leap 16.0: libcap-progs 2.73-160000.3.1 ยท BSD-3-Clause OR GPL-2.0-only
- opensuse-leap 16.0: libcap-progs 2.73-160000.3.1 ยท BSD-3-Clause OR GPL-2.0-only
- opensuse-leap 16.0: libcap-progs 2.73-160000.3.1 ยท BSD-3-Clause OR GPL-2.0-only
- ubuntu questing: libcap2-bin 1:2.75-7ubuntu2
- ubuntu questing: libcap2-bin 1:2.75-7ubuntu2.2 ยท BSD-3-Clause OR GPL-2.0-only
- ubuntu resolute: libcap2-bin 1:2.75-10ubuntu2 ยท BSD-3-Clause OR GPL-2.0-only
- ubuntu stonking: libcap2-bin 1:2.78-1ubuntu1 ยท BSD-3-Clause OR GPL-2.0-only
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms