Linux – Unset `setcap` additional capabilities on excutable

capabilitieslinux

An answer to Linux: allowing an user to listen to a port below 1024 specified giving an executable additional permissions using setcap such that the program could bind to ports <1024:

setcap 'cap_net_bind_service=+ep' /path/to/program

What is the correct way to undo these permissions?

Best Answer

To remove capabilities from a file use the -r flag

setcap -r /path/to/program

This will result in the program having no capabilities.

Related Question