FIX: Operation not permitted as root in OS X Terminal

Switch OffWhen running commands in El Capitan OS X terminal, even as root  you may be greated with a rather unhelpful error message of ‘Operation not permitted’. In fact, this isn’t an error message at all – it’s part of an OS X El Capitan feature called System Integrity Protection.

The following is a description from the Apple website:

System Integrity Protection is a security technology in OS X El Capitan that’s designed to help prevent potentially malicious software from modifying protected files and folders on your Mac.

In OS X, the “root” user account previously had no permission restrictions and could access any system folder or application on your Mac. Software gained root-level access when you entered your administrator name and password to install it and could then modify or overwrite any system file or application.

System Integrity Protection restricts the root account and limits the actions that the root user can perform on protected parts of OS X.

Read more

 In order to switch off the System Integrity Protection, you firstly need to boot your Mac from the built in recovery partition, to do this follow the steps below;
  1. Power off your Mac
  2. Press and hold CMD + R on your Mac keyboard
  3. From the Utilities menu, select Terminal
  4. Copy and paste or type in the following:

    csrutil disable
    reboot

Once El Capitan has finished booting back up, you should be able to perform your advanced file manipulation without any more operation not permitted messages.

It is worth bearing in mind, if you leave this switched off you’re leaving your Mac vunerable to accidental or malicious system level file changes, which could result in it needing a complete reinstall or worse. So unless you are a confident advanced user, it would be worth repeating the steps above but replacing disable with enable.

Mike Hudson

Mike Hudson is a Infrastructure Analyst living and working in Kingston Upon Hull. With extensive experience in Microsoft and Apple technologies, ranging from desktop OS’s to Server OS’s and hardware. By day working as part of an infrastructure team, and by night ridding the world of IT issues through blog posts..

%d bloggers like this: