Q: Can't mv or cp to /usr/share/dict
Hi!
I had some wordlist files in my /usr/share/dict directory which did not make the transition to El Capitan, for some reason. Luckily, I had copies of some of these files in another directory, because I didn't notice the discrepancy for quite a while. Anyway, I tried dragging them via the Finder, but was not given the option to authenticate. So, then I tried to sudo cp them, but got: Operation not permitted.
The permissions are:
drwxr-xr-x 8 root wheel 272 Oct 20 05:29 /usr/share/dict
I tried sudo chmod u+w, but it wouldn't change. I looked to see if it was flagged:
ls -lO /usr/share/ |grep dict
drwxr-xr-x 8 root wheel restricted 272 Oct 20 05:29 dict
I'm not exactly sure what "restricted" means here, and it's not listed as a specific flag for chflags. Like, I couldn't go "norestricted" and fix that, right?
Anyway, long story short, I've never not been able to not figure out how write to a directory before. What's going on? I don't recall having this problem with previous OS versions. I was always able to access this directory (via authenticating). Did something change? And more importantly, what do I do?
TIA!
iMac, OS X El Capitan (10.11.3)
Posted on Jan 24, 2016 1:57 PM
El Capitan implimented SIP (System Integrity Protection), which means you cannot modify any of the system files or folders. Not even using the 'sudo' command.
<https://en.wikipedia.org/wiki/System_Integrity_Protection>
<About System Integrity Protection on your Mac - Apple Support>
If you had things in any of the SIP protected directories before upgrading to El Capitan, they would have been moved or deleted.
If you want more information about SIP, Google will give you lots of articles about it, and even if you want to disable it. But, you can bet the next time you upgrade OS X, it will clean out anything in SIP protected directories, just like it did during the El Capitan upgrade.
Posted on Jan 24, 2016 2:06 PM