【发布时间】:2017-12-23 14:10:37
【问题描述】:
这是我正在使用的操作系统:
Linux securecluster 4.9.8-moby #1 SMP Wed Feb 8 09:56:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
当尝试以 root 用户身份将 gdb 附加到挂起进程时,我得到以下信息:
Attaching to process 9636
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
我修改了 /etc/sysctl.d/10-ptrace.conf ,导致:
kernel.yama.ptrace_scope = 0
但是,我遇到了同样的错误。 我尝试更改 /proc/sys/kernel/yama/ptrace_scope :
echo 0 | tee /proc/sys/kernel/yama/ptrace_scope
tee: /proc/sys/kernel/yama/ptrace_scope: Read-only file system
感谢提示。
【问题讨论】: