We do not use any AI writing tools. All our content is written by humans, not robots. See our editorial process.

One of the issues that you may run into when learning to use Terminal is the “Operation Not Permitted” error. Luckily, this error is pretty simple to fix. It simply means that the Terminal does not have access to whatever file you are trying to reach.

As someone who is always toying with macOS, either to fix an issue on one of my customers’ computers or to work on one of my own projects, I have seen just about every Terminal error under the sun. 

Let’s check out a few tips you can put to use if you run into the “Terminal operation not permitted” error.

Key Takeaways

  • Terminal Operation Not Permitted Error on Terminal on your Mac is a relatively easy fix, and typically it is caused by one of the following possibilities.
  • The file being accessed is locked, meaning you might need to unlock it via Finder.
  • The folder has Apple Quarantine Extended Attribute, which you can easily remove via Finder.
  • If Terminal does not have Full Disk Access, you can easily check this.
  • Lastly, System Integrity Protection (SIP) might need to be disabled. But This is a temporary fix, and SIP should be reenabled as soon as possible. 

The Causes of “Terminal operation not permitted” on Mac

For more seasoned Mac users, the Terminal app is a very convenient way to do many things on the backend of your Mac that you wouldn’t normally be able to do on the GUI (Graphical User Interface). 

For less seasoned Mac users, it can be a bit more complicated, but if you have the right commands and understanding of the terminal, it is easy to learn. 

If you’re running into the error “Terminal operation not permitted,” it could be due to the file being locked, the file having a quarantine attribute, the terminal not having full disk access, or a system integrity problem

Let’s start with the easiest fixes first.

Fix #1: Ensure the File you are Accessing is not Locked

The first (and arguably easiest) problem that could be causing the Operation Not Permitted error is simply that the Terminal cannot reach the file you are trying to alter because it is locked. To check if the file is locked, we can use Finder. 

Step 1: With Finder Open, Navigate to the desired folder. Right-click (or click the trackpad with two fingers). Choose Get Info

Step 2: Verify that the Locked box is not checked and blue (like the image below), if it is, click to remove the check. 

Step 3: Try to run your Terminal Command again.

Fix #2: Remove Apple Quarantine Extended Attribute

Sometimes, when your MacOS detects that there is a file that can be executed located in your folder, it will add a com.Apple.Quarantine attribute to the folder. This prevents the executable from running. If this is the case, then Terminal may not be able to run properly. 

Open the desired folder in Finder, if you see a folder or file with the name com.Apple.Quarantine, then move it to the trash bin.  

Fix #3: Ensure Full Disk Access is Enabled for the Terminal

If Terminal does not have Full Disk Access, then it may run into problems when it has to access the file that you are trying to work with. 

Take the following steps to ensure you have full disk access.

Step 1: Open System Settings using the Apple menu. 

Step 2: Navigate to Privacy & Security on the left and Full Disk Access on the Right.

Step 3: Click to turn on Terminal.

Step 4: Enter your TouchID or Password to Confirm.

Step 5: Terminal will now show as turned on.

Fix #4: Temporary: Disable SIP (System Integrity Protection)

System Integrity Protection, or SIP is a very important feature on your Mac that helps to keep the entire computer safe from unauthorized programs and code. 

Because of this, this is not a recommended fix if you are not familiar with Terminal. Additionally, if you choose to move forward with this method, be sure to re-enable SIP when you are done.

Disable SIP

  1. Start your Mac in Recovery Mode (Use Command-R keys at startup)
  1. Use the Utility menu to launch Terminal
  1. Enter the command: csrutil disable
  1. Restart your Mac normally

Enable SIP

  1. Start your Mac in Recovery Mode (Use Command-R keys at startup)
  1. Use the Utility Menu to launch Terminal
  1. Enter the command: csrutil enable
  1. Restart your Mac normally

Final Thoughts

Seeing the Operation Not Permitted Error on your Mac can be quite frustrating. However, it is often an easy fix! 

One of the four fixes in this article should have helped you to solve this problem and continue to use Terminal normally. This could have been unlocking the folder that you were trying to alter in Terminal, removing the quarantine attribute, providing Terminal with Full Disk Access, or disabling SIP. 

Which fix worked for you? Were you able to solve the Terminal operation not permitted error? Let us know in the comments!