benfred / py-spy

Sampling profiler for Python programs
MIT License
12.14k stars 400 forks source link

Permission denied in CentOS7 when creating a new process #619

Open MrQuansy opened 9 months ago

MrQuansy commented 9 months ago
image

In production environment, we can not always get a 'sudo permission' all the time. I find py-spy can run through starting a new process without root permission as document said. But permission denied occurred when I tried it.

timhughes commented 8 months ago

Take a look at https://man7.org/linux/man-pages/man7/capabilities.7.html and https://www.vultr.com/docs/working-with-linux-capabilities/

My guess is that you need to add cap_sys_ptrace