Set capabilities of specified file. See also: tldr getcap. More…
Set capabilities of specified file. See also:
tldr getcap
. More information: https://manned.org/setcap.
cap_net_raw
(to use RAW and PACKET sockets) for a given file:setcap '{{cap_net_raw}}' {{path/to/file}}
setcap '{{cap_dac_read_search,cap_sys_tty_config+ep}}' {{path/to/file}}
setcap -r {{path/to/file}}
setcap -v '{{cap_net_raw}}' {{path/to/file}}
-n {{rootuid}}
argument can be used to set the file capability for use only in a user namespace with this root user ID owner:setcap -n {{rootuid}} '{{cap_net_admin}}' {{path/to/file}}