Operation not permitted error on Mac? Here’s how to fix it

by Milan Stanojevic
Milan Stanojevic
Milan Stanojevic
Windows & Software Expert
Milan has been enthusiastic about technology ever since his childhood days, and this led him to take interest in all PC-related technologies. He's a PC enthusiast and he... read more
Affiliate Disclosure
  • Terminal is incredibly powerful macOS tool, but some users reported certain issues with it.
  • According to users, they are getting Operation not permitted message in the Terminal, so today we’ll show you how to fix this problem for good.
  • If you’re interested in the macOS and want to learn more, check out this dedicated macOS article.
  • We covered Mac issues in the past, and for more useful guides and fixes, head over to our Mac Hub.
operation not permitted mac

Terminal is a key component on macOS, and sooner or later you will probably use it. While Terminal can be complicated as it is, some users reported Operation not permitted message on their Mac.

This can be a problem, and it will prevent you from running certain commands in the Terminal. However, there’s a way to fix this, and today we’ll show you how to do it.

How can I fix Operation not permitted error on Mac?

1. Modify your Security settings

  1. Open Apple menu and go to System Preferences.
  2. Navigate to Security & Privacy > Privacy.
  3. Now click on Full Disk Access in the left pane.
    full disk access operation not permitted mac
  4. Click the lock icon and enter your administrator password.
  5. Click the Plus icon and go to the following directory:
    • /Applications/Utilities/
  6. Select Terminal.

After doing these steps, restart the Terminal and Operation not permitted message will be gone.

2. Check if the file is locked

  1. Open the Terminal.
    terminal operation not permitted mac
  2. Enter the following command:
    • chflags nouchg path/to/the/locked/file

After running this command, the file should become unlocked and you’ll be able to move it. If you’re not too keen on command line, you can do this by following these steps:

  1. Locate the file that you want to move in Finder.
  2. Right-click the file and choose Get Info.
  3. Now uncheck the Locked option.
  4. Save changes and try to move the file again.

3. Copy the files to /usr/local/bin

  1. Install or copy the files to the /usr/local/bin directory.
  2. After that, check if the problem is resolved.

Users reported that usr/bin path is giving them Operation not permitted error message, but after moving or installing the files to the the /usr/local/bin path, the issue was resolved.

4. Disable System Integrity Protection (SIP)

  1. Restart your Mac.
  2. As soon as the computer starts restarting, press and hold the Command + R.
  3. Go to Utilities > Terminal.
  4. Run the following commands:
    • csrutil disable
    • reboot

After running these commands, the problem should be gone. Keep in mind that disabling SIP can leave your Mac vulnerable, so use this as a temporary last resort.

To enable SIP again, repeat the steps from above but run the following commands instead:

  • csrutil enable 
  • reboot

Operation not permitted message usually appears if you don’t have certain privileges, but you can easily fix that by giving full disk access to the Terminal.

This article covers:Topics: