Operation not permitted using Find in macOS Terminal

macospermissionsterminal.app

This is a lead-up to my main question here (Fully uninstall Norton from mac)

I get "Operation not permitted" when running "sudo find" in terminal on macOS.

I have given terminal Full Disk Access in System Preferences, Security & Privacy.

Here is the command I run:

% sudo find / -name "norton" >> norton.txt

It returns some files and directories into the .txt file, but I get two screens full of Operation not permitted errors, mostly in /System/Volumes/Data/private/var/folders/

Why is this happening? How do I fix it?

Best Answer

macOS restricts Terminal access to certain parts of the disk by default. You can disable this one of two ways:

  1. Go to System Preferences > Security & Privacy and give Full Disk Access to Terminal.
  2. Turn of System Integrity Protection (not generally recommended.) This disables full protection for system-related items on the disk, as well as some other protections including restricted access via Terminal.
Related Question