setcap Command Examples

Set capabilities of specified file. See also: getcap. More information: https://manned.org/setcap.

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}}

setcap -n {{root_uid}} '{{cap_net_admin}}' {{path/to/file}}