KB Article #180461

Setcap -r reports "no data available" error

Problem

The release note prerequisites for a service pack ask you to run this command:

setcap -r INSTALL_DIR/apigateway/platform/bin/vshell

However, when you do so, you see an error like the following:

root@axway-testing:/opt/Axway/apigateway/platform/bin# setcap -r vshell
Failed to set capabilities on file `vshell' (No data available)
usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]

 Note <filename> must be a regular (non-symlink) file.

Resolution

This is caused by a bug #633075 in setcap, which reports a confusing error message when there are no capabilities present on a file. The prerequisite is to remove the capabilities, of which there are none, so this error may be ignored. You can verify that vshell does not have any capabilities by running getcap vshell and then you can continue with the SP installation normally.