ls: : Operation not permitted - Mojave security?
Is this directory protected by Mojave's new security features?
$ sudo ls -laR /var/db/dslocal/nodes/Default/
ls: Operation not permitted
It works in High Sierra but not Mojave. How do we view the contents of this directory?
A less drastic way:
Go to System Preferences > Security & Privacy and give Full Disk Access to Terminal.
Adapted from https://discussions.apple.com/thread/8637915
This did it for me
Steps:
Apple menu -> System Preferences -> Security & Privacy -> Privacy -> Full Disk Access -> +
Choose:
Applications -> Utilities -> folder -> Terminal -> open/grant terminal full disk access privileges. -> Relaunch terminal
In my case helped simply:chflags -R nouchg .
This code I used in terminal in folder with problematic file.
Source: https://txcowboycoder.wordpress.com/2011/01/10/svn-cant-move-svntmpentries-operation-not-permitted/