Non-root cannot gdb attach restrictions

Source: Internet
Author: User

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

Starting with ubuntu10.10, process A cannot debug process B unless process B is a child process of process A, or process A is run as root. This increases the security of the process. This security limit is the default, but you can debug the purpose of process B by modifying the configuration file to achieve any process a.

Before modification (/etc/sysctl.d/10-ptrace.conf):
Kernel.yama.ptrace_scope = 1
After modification:
Kernel.yama.ptrace_scope = 0

Note : You need to restart the machine after the modification to take effect, personally tested Oh

Non-root cannot gdb attach restrictions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.