Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home»Mac»What is “Operation not permitted” Error on Mac? How to Fix It

What is “Operation not permitted” Error on Mac? How to Fix It

utkarshaBy utkarshaNovember 3, 2022
operation not permitted 5

While working on the macOS command line, you can sometimes encounter an “Operation not permitted” error message. This then makes it difficult for you to navigate through the terminal and issue commands to your system.

Usually, a macOS security feature known as Full Disk Access is responsible for this error popping up on your screen. Disabling Full Disk Access can restrict you from accessing files in certain locations and directories. So when the terminal tries to access the particular file/folder, the system doesn’t permit it to run the command(s).

However, there are other factors to consider as well, and we shall skim past all those causes down below. But rest easy knowing that this problem can be solved by taking some very easy and surefire steps.

Table of Contents

  • Why Am I Seeing This Error Message?
  • What is “Operation not permitted” Error on Mac? How to Fix It
    • Enable Full Disk Access
    • Unlock Locked Files
    • Disable SIP
    • Change File Directory

Why Am I Seeing This Error Message?

So, along with the one mentioned above, here are all the reasons you might be seeing the “Operation not permitted” error on your screen:
  • Full Disk Access
  • Locked Files
  • An unsuitable file directory
  • System Integrity Protection

What is “Operation not permitted” Error on Mac? How to Fix It

There are a few different ways to fix this error on your system. We shall go through all those ways, one step at a time. So, by the end of this article, we guarantee that you’ll no longer see this prompt on your terminal screen.

Enable Full Disk Access

You can give the terminal access to the entire disk through the System Preferences. Doing so will allow the system to modify files and folders present in every nook and cranny of your system. And then, you’ll no longer get the “Operation not permitted” error message.

  1. From the menu bar, go to Apple > System Preferences.
  2. Click on Security & Privacy settings.
  3. Click on the lock and enter your admin password to allow new changes.
  4. Navigate to Privacy.
  5. Select Full Disk Access from the left panel.
    full-disk-access
  6. Now, click ‘+’ to give selected applications full disk access.
  7.  Select Terminal from the list of applications and Open it.
  8. Go back to Full Disk Access and make sure that the Terminal is marked for full access.
    full-disk-access-terminal
  9. If prompted, Quit & Reopen the terminal.
  10. Finally, click on the lock to save your changes.

Unlock Locked Files

If you’re trying to access a file via the terminal and notice that the operation is not permitted to continue further, chances are that the particular file is locked. A locked file cannot be altered or modified in any way. So, to prevent this ongoing issue, you can specify the file path in the Terminal and enter a set of commands to unlock it.

  1. Press Command + Space to open Spotlight.
  2. Type and go to Terminal.
  3. Enter this command:
    chflags nouchg /*file path*
    chflags
    For e.g. chflags nouchg /Maschitosh HD/Library/Preferences/abc
  4. Type exit to exit the terminal.

Disable SIP

Like Full Disk Access, another macOS security feature known as System Integration Protection (SIP) can also influence disk permissions and operations. Apple implemented the SIP security standard on macOS to ensure that no system files are unnecessarily altered or modified.

However, you can easily bypass this security feature through the command line. But, we recommend you do so temporarily as the SIP works to maintain your system’s stability and its overall health.

The SIP has to be disabled before the OS fully loads up. Hence we’ll be accessing the macOS recovery window to enter a set of commands and disable SIP. So,

On Intel Macs

  1. Restart your computer.
  2. As soon as the system begins to start up again, hold Command + R until you see the Apple icon.
    cmd-r
  3. Then, from the menu bar, go to Utilities > Terminal.
  4. Type csrutil disable and hit enter.
  5. Then, enter reboot to restart your computer normally.

On Apple Silicon Macs

  1. Shut down your computer.
  2. Hold Power and startup your system.
  3. Release the hold only after you see the startup Options.
    startup-options
  4. Then, go to Options.
  5. Now, from the menu bar, go to Utilities > Terminal.
    utilities-terminal
  6. Type csrutil disable and hit enter.
  7. Then, enter reboot to restart your computer normally.

Now, if and when you want to enable the SIP feature, go to Utilities > Terminal the same way as mentioned above and run the csrutil enable command instead. 

Similarly, to check the SIP status of your device, run the command csrutil status and look for either the ‘System Integrity Protection status: enabled’ or ‘System Integrity Protection status: disabled’ message.

Change File Directory

While skimming through various forums, we noticed that plenty of users encountered the “Operation not permitted” error message while trying to access a file in /usr/bin directory of your computer. Furthermore, for those users, transferring that particular file to /usr/local/bin seemed to fix the problem.

/bin stands for ‘Binary’. That is, this folder stores executable commands to execute certain functionalities on your installed application. Since a wrong move can greatly alter your app’s configuration setting, we recommend you follow this method if nothing else works.

  1. From the menu bar, click on Go > Computer.
  2. Select your main disk drive (by default, named Macintosh HD).
  3. Then, press Shift + Command + . (period) to view hidden files.
  4. Now, navigate to usr > bin folder.
    usr-bin
  5. Copy the required file(s) and paste it on usr > local > bin folder. 
    usr-local-bin
  6. Restart your computer.
fix
utkarsha

Utkarsha is a tech writer who specializes in writing about macOS. He has been using the platform since its earliest days, and has written extensively about its various iterations. He also enjoys watching movies and traveling.

Related Posts

how-to-extend-display-on-mac-1

How to Extend Display on macOS

December 26, 2022
how-to-zoom-out-on-mac

How to Zoom Out on Mac

December 26, 2022
batch-rename-files-mac

How to Batch Rename Files on Mac

December 22, 2022
how-to-airplay-from-iphone-to-mac

How to Airplay From iPhone to Mac

December 21, 2022
how-to-add-printer-to-mac

How to Add Printer to Mac

December 20, 2022
transfer-file-between-iphone-and-mac-1

How to Transfer File Between iPhone and Mac

December 19, 2022
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
what is ghost of tsushima legends

What is the Ghost of Tsushima Legends Mode

January 12, 2023
raid 5 vs raid 10

RAID 5 Vs RAID 10 – Which One Is Better?

January 12, 2023
best-tv-settings-for-gaming

Best TV Settings for Gaming

January 9, 2023
You may also like
tv-screen-goes-black-randomly

TV Screen Goes Black Randomly? Try These 11 Fixes

January 15, 2023
how to find unique values in excel

How to Find Unique Values in Excel

January 15, 2023
how-to-open-and-use-chrome-settings

How to Open and Use Chrome Settings

January 16, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Editorial Guidelines
  • Fact-Checking Policy
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday.

Type above and press Enter to search. Press Esc to cancel.