Setcap not found in Debian 9
Searching for setcap
I believe setcap
is contained in this package libcap2-bin
. I found this by googling for "debian setcap" which led me to this man page:
- https://manpages.debian.org/jessie/libcap2-bin/setcap.8.en.html
The title of the man page tells you which package it resides in:
/ jessie / libcap2-bin / setcap(8)
Now that we "think" we know the package's name we can search for it:
- https://packages.debian.org/jessie/libcap2-bin
If you scroll down to the bottom of that page you'll see all the various architectures. Click the link for amd64:
- https://packages.debian.org/jessie/amd64/libcap2-bin/filelist
Found it
And there's setcap
:
File list of package libcap2-bin in jessie of architecture amd64
/sbin/capsh
/sbin/getcap
/sbin/getpcaps
/sbin/setcap
/usr/share/doc/libcap2-bin/README.Debian
/usr/share/doc/libcap2-bin/changelog.Debian.gz
/usr/share/doc/libcap2-bin/changelog.gz
/usr/share/doc/libcap2-bin/copyright
/usr/share/man/man1/capsh.1.gz
/usr/share/man/man1/getpcaps.1.gz
/usr/share/man/man5/capability.conf.5.gz
/usr/share/man/man8/getcap.8.gz
/usr/share/man/man8/pam_cap.8.gz
/usr/share/man/man8/setcap.8.gz
Just do a search to see if a package has that command using
apt-file search setcap
if apt-file is not install first get it installed then re-issue above :
sudo apt install apt-file -y && sudo apt-file update
apt-file search setcap
the entry you want appears as
libcap2-bin: /sbin/setcap
now you know which package has it so install using
sudo apt-get install libcap2-bin
to see contents of a package issue
dpkg -L some-package
dpkg -L libcap2-bin
where you will see setcap
and its get counterpart getcap