Refer: http://osxdaily.com/2018/10/09/fix-operation-not-permitted-terminal-error-macos/
- Pull down the Apple menu and choose ‘System Preferences’
Choose “Security & Privacy” control panel - Now select the “Privacy” tab, then from the left-side menu select “Full Disk Access”
- Click the lock icon in the lower left corner of the preference panel and authenticate with an admin level login
- Now click the [+] plus button to add an application with full disk access
- Click the Plus button to add Terminal to Full Disk Access in macOS
- Navigate to the /Applications/Utilities/ folder and choose “Terminal” to grant Terminal with Full Disk Access privileges
- Select Terminal app to grant full disk access in MacOS
- Relaunch Terminal, the “Operation not permitted” error messages will be gone
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).
