Home > How to Tips

How to Fix When Terminal Says "Operation not permitted" on Mac

Updated on Tuesday, June 17, 2025

iBoysoft author Yvonne Feng

Written by

Yvonne Feng
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português Türkçe

Summary: Unable to run a command in Mac Terminal with the "Operation not permitted" error message? Here, we will explain why this error occurs and provide solutions to resolve it on a Mac.

operation not permitted Mac Terminal

By using command lines in the Terminal, you can easily view the directories of the user account, manage processes, erase the startup disk, etc.

However, when you enter the command, Terminal may say "Operation not permitted" or "zsh: command not found", such as ls and kill process. What does it mean? Read to know why the operation is not permitted and how to fix it.

Share to let more people learn about Operation not permitted error!

 

How to fix Terminal error: Operation not permitted

As we know, the “Operation not permitted” could be due to Full Disk Access permission or System Integrity Protection, so we can fix this Terminal error from these aspects. You can follow the detailed guides below to remove the Operation not permitted notification from the Terminal on your Mac computer.

Enable Full Disk Access to Terminal

  1. Click on the Apple logo and choose System Preferences.
  2. On the new window, find and open Security & Privacy.
  3. Choose the Privacy tab, then find Full Disk Access on the left sidebar.
  4. Click on the padlock in the left corner, and use Touch ID or password to unlock it.
  5. If the Terminal displays on the left pane but is checked, then check the box for it. Choose Quit & Reopen to grant Terminal full disk access. 
  6. If not, click the + icon on the right pane, and find Terminal from Applications, click Open.  
  7. Then Terminal will be listed in the list of allowed apps with the box checked.
  8. Launch Terminal and enter the same command that triggers the operation not permitted error to see whether it works now.

enable Full Disk Access to Terminal

Disable System Integrity Protection Temporarily

"Operation not permitted" message still appears after enabling the Full Disk Permission to Terminal? Then, you can temporarily turn off System Integrity Protection on your Mac by using csrutil.

Developers must disable SIP to test code, debug apps, and install system extensions on a Mac. After you perform the necessary tasks, you'd better reenable SIP as soon as possible to protect your Mac from virus attacks and malware infections.

  1. Shut down your Mac and reboot it into macOS Recovery mode.
  2. Click Utilities from the top menu bar and launch Terminal.
  3. Type the csrutil disable command in Terminal
  4. Press Return or Enter on the keyboard.
  5. Then click the Apple menu and choose Restart.
  6. Open the Terminal app and run the previous command.

disable SIP on Mac

Disabling System Integrity Protection leaves your Mac vulnerable. Therefore, after completing tasks in Terminal, you should reenable  System Integrity Protection. Just repeat the above steps and run the command csrutil enable instead in Terminal. 

Haens your problem be fixed? Click the icon below to share with more people!

 

Why does Terminal say Operation not permitted or zsh: command not found

Some Mac users report that the Terminal works well on Mac, but they receive the error message "Operation not permitted" after they update macOS to Mojave, Catalina, Big Sur, Monterey, Ventura, Sonoma, and Sequoia. This is because of the new security feature - Full Disk Access. 

Full Disk Access requires applications to be granted full permissions to access user-protected files; for applications without Full Disk Access, some data on the Mac will not be accessible. And on macOS Sequoia and earlier, the Full Disk Access permission is automatically granted during the installation of the apps.

In addition to the Full Disk Access, the "Operation not permitted" error may be caused by another macOS feature - SIP (System Integrity Protection). This mechanism is introduced in OS X 10.11 and works to protect system-owned files and directories from unwanted modifications. If you try to edit the protected contents in the Terminal, the message "Operation not permitted" will show up.

When the Terminal error is "zsh: command not found.", it means the system can't recognize the command because it's either misspelled, not installed, or not in the system's PATH. To fix it, check the spelling, install the missing tool, or update your shell configuration (like .zshrc) to include the correct path.

The bottom line

When the Terminal says "Operation not permitted," it means you are not privileged to access the protected files and directories on your Mac. But you get two fixes in this post. After you enable the Full Disk Access permission to Terminal or disable SIP in Recovery mode, the error message will disappear, and don't forget to reenable SIP after using Terminal.

If you encounter the Terminal not working issue, read: Terminal not launching, responding, or executing commands, how to fix?

Fix your Terminal issues fast! Share this helpful guide with your friends!