2

I am trying to edit the file /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist (It is a binary plist) but I always receive the same error (I don't have enough permissions to do it).

I tried some ways to do it with no lock. These are the things I tried:

1) Open this file with XCode 7 beta, I changed the value I was looking for and when I tried to save the changes I couldn't because I didn't have enough permissions

2) I ran this command sudo nvram boot-args="kext-dev-mode=1 rootless 0" in the terminal and I restarted trying to edit the file like in 1). Same error.

3) I copied the file to my desktop, I changed the value I need to change I save it. After that, I tried remove the original file and copy the new one. Same error.

4) I tried to unlock the file from Finder (and after that I tried to change the permissions from Terminal) but I couldn't.

I am totally lost, I don't know what else to try to edit and change that file. Do you have any suggestion?

UPDATE 1
This is the output of ls -l@AeO Exceptions.plist

-rw-r--r-- 1 root whell restricted,compressed 63573 Jun 11 20:05 Exceptions.plist

SOLUTION

  • I edited the file /System/Library/Sandbox/rootless.conf

  • I commented the line with the path where I want to change the file

  • I restarted my computer and change the file (with sudo)

  • I edited the file /System/Library/Sandbox/rootless.conf again and I uncomment the line previously commented

  • I restarted my computer again and voila :)

  • Can you run ls -l@AeO (that's a lower case ell and a capital oh) on the file and on the directory it's in, so we can see how it's protected (permissions, owner/group, ACLs, file flags, etc.)? Edit/update your question with the output. – Spiff Jul 3 '15 at 23:35
  • I added the output of the ls command – CrApHeR Jul 3 '15 at 23:48
1

How about:

sudo vi /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist

Well, that would work if it's a text plist. If it's a binary plist, you'll have other troubles.

In that case, after editing it like you did in attempt #3, try this:

sudo cp ~/Desktop/Exceptions.plist /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist
  • It is a binary plist. I forgot to mention that, I'll edit my question. – CrApHeR Jul 3 '15 at 23:42
  • About the commands, all the commands I ran were with sudo. I think the problem is related with the rootless feature in OSX El Capitan. – CrApHeR Jul 3 '15 at 23:49
1

This is the solution I found (If anyone find a better or easier solution please post as an answer)

  • I edited the file /System/Library/Sandbox/rootless.conf

  • I commented the line with the path where I want to change the file

  • I restarted my computer and change the file (with sudo)

  • I edited the file /System/Library/Sandbox/rootless.conf again and I uncomment the line previously commented

  • I restarted my computer again and voila :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.