If you have not encountered the “Operation not permitted” error message in the Terminal of MacOS (Mojave 10.14 or later) yet, then it’s likely because you haven’t wandered into a directory or file path that has the additional access restrictions (or that you don’t use Terminal, in which case this entire article is not for you). Relaunch Terminal, the “Operation not permitted” error messages will be gone.Navigate to the /Applications/Utilities/ folder and choose “Terminal” to grant Terminal with Full Disk Access privileges.
How to Fix “Operation not permitted” Error in Terminal for Mac OS This walkthrough will show you how to fix “Operation not permitted” error messages seen at the command line in Terminal for Mac OS in Mojave 10.14 or later.