Search code examples
rootmacos-mojave

"Operation not permitted" for root under Mojave


Very frustrating: I cannot mv, rm etc as a root on MAC OS 10.14.

There seems to be a solution here: https://apple.stackexchange.com/questions/332673/what-and-how-does-macos-mojave-implement-to-restrict-applications-access-to-pers#new-answer?s=48cff4034161476583b318b961feb7d1

but it does nothing in my case: I just added Terminal to the list of apps that have full access to "Full Disk Access" (I don't see "Application Data" field in Settings), –– still I simply cannot remove a file under /usr/bin , it says " Operation not permitted":

root@VKMBP4:/usr/bin$ whoami
root
root@VKMBP4:/usr/bin$ pwd
/usr/bin
root@VKMBP4:/usr/bin$ mv python was-python 
mv: rename python to was-python: Operation not permitted
root@VKMBP4:/usr/bin$ rm python 
override rwxr-xr-x  root/wheel restricted,compressed for python? y
rm: python: Operation not permitted

Any suggestions how to fix it (beside uninstalling Mojave)? Thanks!

Here is a Screenshot: Settings / Security & Privacy


Solution

  • I've noticed that you can be logged-in as root, and the Mac OS X CLI will still require you to type sudo for privileged operations. By the way, you should probably be using sudo from a regular admin user, rather than root.