Running the strace command returns: "strace: ptrace(PTRACE_TRACEME, ...): Operation not permitted"

Solution Verified - Updated -

Issue

  • When attempting to run strace for a given command, the following error is printed:
strace: ptrace(PTRACE_TRACEME, ...): Operation not permitted
  • When running the command cat /proc/sys/kernel/yama/ptrace_scope, the output is 3 even though the sysctl.conf has the value at 0.

Environment

  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content