1

I was looking at this article.

It recommends allow the usage of dtrace without root for current user, so I run:

$ sudo chmod u+s /usr/sbin/dtrace
Password: # I enter in my password
chmod: Unable to change file mode on /usr/sbin/dtrace: Operation not permitted

Does anyone know if I should, and how I should, allow dtrace to run without root permissions?

halfer
  • 19,824
  • 17
  • 99
  • 186
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817

1 Answers1

5

I'm not sure what article you were reading, but its advice is unsafe and incorrect. You should never change permissions on files stored in system locations, like /usr/bin and /usr/sbin. (Indeed, System Integrity Protection makes this impossible.)

If you need to use dtrace, run it using sudo.