System integrity protection (SIP) is a feature in macOS that prevents certain critical locations on your disk from being modified. it doesn’t matter if you have admin rights or not. If you’re trying to access or change files in one of the restricted locations either via Finder or via Terminal commands, it will not work. This is both a good thing, and a bad thing. It’s good if you’re running an app with the highest possible privileges and the app turns out to be malicious. It’s a bad thing because at times, you need to modify the restricted folders and you’re unable to. If you’re running a command in Terminal and it keeps failing because of SIP, you can disable it. Here’s how you can disable system integrity protection on macOS.
Note: SIP is an important feature and it’s there for your safety. It is understandable that you might need to disable it for a short period of time however, you should enable it again as soon as you can. It is not a good idea to permanently disable system integrity protection.
System integrity protection was added in El Capitan.
System integrity protection
Boot your Mac into recovery mode. To do that, you need to hold down the Command + R key while your Mac is booting. If your Mac is currently running, you can choose to restart it and tap the recovery keys before it boots up. Release them when you see the Apple loading animation.
Once you’re in recovery mode, you will see the following window.
You will also get the menu bar at the top. On the menu bar, go to Utilities>Terminal. This will open a new Terminal window.
Once you’re in the Terminal, you need only execute one command to disable System Integrity Protection, and similarly one command is all you need to enable it again.
Run the following command to disable system integrity protection;
Tap Enter and you will see a message telling your that system integrity protection has been disabled. Restart your system and when you boot to the desktop, you will be able to run the commands that you were unable to before.
With your Mac in recovery mode, open Terminal and run the following command;
Tap enter and system integrity protection will be enabled. Boot to your desktop and everything should be back to normal. The folders that SIP locked down will once again be restricted and no changes can be made to them.