
How to Fix “Operation Not Permitted” in Mac Terminal
Updated
Learn how to quickly fix the "Operation Not Permitted" error in macOS

This error happens when macOS security restrictions block an application like Terminal from accessing protected folders, and all you need to fix it is administrator access to your Mac.
- To start, open System Settings by pressing
command + space, typing System Settings, and pressing enter. - In the left sidebar, click Privacy & Security.
- Next, scroll down on the right side and click Full Disk Access. Look for the app you are trying to use, such as Terminal or iTerm, and click the toggle switch next to it to turn it on.
- If your application is not listed, click the "+" icon at the bottom of the list, enter your Mac password, select your application from the list, and click Open.
- When you turn on the permission, macOS will prompt you to restart the application, so click Quit & Reopen and wait a moment for the app to reload.
- To test that everything works, go back to your terminal or app and run your command again, or type
ls ~/Desktopto verify that your Mac can now access the folder without errors.
As a quick tip, only grant Full Disk Access to tools and applications you completely trust to keep your system secure.
