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.
Why Am I Seeing This Error Message?
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.
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.
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
On Apple Silicon Macs
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.