Linux Commands Examples

A great documentation place for Linux commands

setcap

set file capabilities


see also : getcap

Synopsis

setcap [-q] [-v] (capabilities|-|-r) filename [ ... capabilitiesN fileN ]


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples


no example yet ...

... Feel free to add your own example above to help other Linux-lovers !

description

In the absence of the -v (verify) option setcap sets the capabilities of each specified filename to the capabilities specified. The -v option is used to verify that the specified capabilities are currently associated with the file.

The capabilities are specified in the form described in cap_from_text(3).

The special capability string, ’-’, can be used to indicate that capabilities are read from the standard input. In such cases, the capability set is terminated with a blank line.

The special capability string, ’-r’, is used to remove a capability set from a file.

The -q flag is used to make the program less verbose in its output.

exit code

The setcap program will exit with a 0 exit code if successful. On failure, the exit code is 1.


see also

cap_from_text, cap_set_file, getcap

How can this site be more helpful to YOU ?


give  feedback