Running Xubuntu 16.04.1 LTS 64-bit.
/proc/sys/kernel/yama/ptrace_scope keeps resetting to 1 if I reboot, despite me changing it to 0 manually. How can I keep ptrace_scope set to a value of 0?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this community/proc values are stored in RAM so it isn't persistent. But it read its initial values from a file. You can permanently change the value of /proc/sys/kernel/yama/ptrace_scope to 0 by editing the file /etc/sysctl.d/10-ptrace.conf
and change the line:
kernel.yama.ptrace_scope = 1
To
kernel.yama.ptrace_scope = 0
In case the change doesn't reflect in /proc/sys/kernel/yama/ptrace_scope, try doing:
echo "0"|sudo tee /proc/sys/kernel/yama/ptrace_scope