Getting "Permission denied" when trying to use setpcaps

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5

Issue

I'm getting "Operation not permitted" errors when running utilities from libcap rpm such as setpcaps or sucaps. What is the correct way to use these utilities?

Resolution

Unfortunately there is no way to associate capabilities with users.

There are programs like setpcaps to set processes capabilities of running processes. The CAP_SETPCAP capability is not given to any tasks, so no processes has the privileges to use it by default.

In RHEL6 the SETPCAP capability is removed in favor of filesystem capability support.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.