As part of our Linux Support Services, we have helped customers to fix Linux related issues.
In this context, we shall look into the root causes of this error and how to fix it.
This error is triggered due to permission issues of the user thereby preventing such user from running the strace command successfully. This signifies that the user does not have the necessary permission.
Fixing this error can be approached in many diverse ways.
i. Since this is most causes by the user not having enough permission, it is highly recommended to user the server as a root user to enable you have all the root level privileges.
ii. If the strace does not work for the current process, it is time to try to strace a new process. To do this, use the command below;
strace -f ./binary
iii. Use the same uid to enable users to strace processes having the same uid. This can be implemented by the root user. In this case the /etc/sysctl.d/10-ptrace.conf file needs to be updated from;
kernel.yama.ptrace_scope = 1
To;
kernel.yama.ptrace_scope = 0
After making changes , Do a reboot of the system to effect changes.