2

I am trying to manually modify preferences file located at

/Library/Preferences/SystemConfiguration/preferences.plist

To modify it, I need to give it read&write permission. I did that. The problem is that the file is in a folder, for which I cannot change permission (I am admin and I have no access), nor do I want to change permissions to the whole folder for security reasons. I only want to change it for preferences.plist file. How can I achieve this?

These are the pop-ups I get when trying to modify it.

enter image description here

enter image description here

Upon modifying permissions to parent folder I get this:

enter image description here

2

1 Answer 1

2

To allow user_name writing to preferences.plist add an ACL with:

sudo chmod +a "user_name allow write" /Library/Preferences/SystemConfiguration/preferences.plist

This changes the output of:

ls -laeO /Library/Preferences/SystemConfiguration/preferences.plist
-rw-r--r--  1 root  wheel  - 59715  9 Feb 23:25 /Library/Preferences/SystemConfiguration/preferences.plist

to:

ls -laeO /Library/Preferences/SystemConfiguration/preferences.plist
-rw-r--r--+ 1 root  wheel  - 59715  9 Feb 23:25 /Library/Preferences/SystemConfiguration/preferences.plist
0: user:user_name allow write

but doesn't change the permissions of the superior folder or other files residing in the same folder:

drwxr-xr-x  15 root      admin        -             510 24 Mär 17:23 SystemConfiguration

To remove the ACL later simply enter:

sudo chmod -a "user_name allow write" /Library/Preferences/SystemConfiguration/preferences.plist
1
  • I ended up disabling SIP and giving the right permission to parent folder, but this seem like a nice answer.
    – sanjihan
    Mar 24, 2016 at 21:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .