While working on the macOS command line, you may 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.
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 may 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.
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 may specify the file path in the Terminal and enter a set of commands to unlock it.
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 may 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 Apple Silicon Macs
Now, if and when you want to enable the SIP feature, go toUtilities>Terminal the same way as mentioned above and run thecsrutil enablecommand instead.
Similarly, to check the SIP status of your device, run the commandcsrutil statusand look for either the ‘System Integrity Protection status: enabled’ or ‘System Integrity Protection status: disabled’ message.