FORUMS: list search recent posts

opening permissions on certain files on my own computer

COW Forums : Apple OS X

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Will Brook
opening permissions on certain files on my own computer
on Mar 13, 2017 at 3:51:55 am

I am working on a 27" iMac running 0SX9.5.
I am trying to edit certain system files, specifically those tied to time machine, and have run into certain blocks which I am trying to understand and bypass.

I was trying to edit the com.apple.backupd-auto.plist file. I opened it, made some changes but was unable to save it afterwards. I received an error, "...You don't have permissions..."

I checked my permissions using "find info" button AND listing permissions in terminal, "ls -l". I was logged in as the root user (admin). In both places my permissions was listed as read only. In both places I changed my permissions to rw (and x in terminal). I could see my permissions change to rw(x), but I still could not change anything and received the same error, "...You don't have permissions..."

After more research, I tried a sudo command to alter the plist. I noticed two things. One, the change after I used the command was added to the plist, but as a new line/entry. Two, the permissions changes I had made previously were wiped away and only the user "system" was listed with any permissions, rwx.

I am assuming this means that the "system" (apple) has locked these files and I have zero control over them. Is this the case? If not, what am I missing? I assumed changing permissions thru terminal was the strongest way and would be permanent. If so (that I am locked out), is there any way around this?

I did note that using the "sudo defaults writes" command seemed to add new entries to the plist. The entries where new, stand-alone lines in the plist. My error seems to have been that the entries I'm trying to change are sub listings and I didn't provide the direct path in my command. Can anyone tell me, when using this command, how to type in the path to the sub entries? To reiterate, if the plist value I was trying to change was a key, "com.apple.xxxx", listed under the key MachServices, how would I type this path in?

All comments and advice, or alternatives commands, appreciated as I am not very skilled at permissions, plists and using terminal to manipulate them, and would like to learn as much as possible.


Return to posts index

John Rofrano
Re: opening permissions on certain files on my own computer
on Mar 13, 2017 at 11:39:42 am

The normal permissions for that file on my macOS 10.12.3 Sierra Mac are:
-rw-r--r--  1 root  wheel   1.4K Aug 11  2016 com.apple.backupd-auto.plist
so it does look writable by root, but I have found that sometimes you need to copy a protected file to a place that you can write to it, change it, and them move it back like this:cp /System/Library/LaunchDaemons/com.apple.backupd-auto.plist ~/Desktop
open ~/Desktop/com.apple.backupd-auto.plist
sudo mv ~/Desktop/com.apple.backupd-auto.plist /System/Library/LaunchDaemons/
But I did a little Googling and found this interesting post on superuser.com that says that starting with OS X 10.9.0 Mavericks (which I believe you have), Apple changed the scheduling of background tasks to be managed by XPC Services, so instructions for earlier versions of OS X no longer work. I'm not sure what you are trying to accomplish but the post gives an example where the following commands will cause Time Machine to run every 3 hours on average, up from the standard 1 hour:
sudo /usr/libexec/PlistBuddy -c 'set :LaunchEvents:com.apple.xpc.activity:com.apple.backupd-auto:Interval 10800' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist
sudo /usr/libexec/PlistBuddy -c 'set :LaunchEvents:com.apple.xpc.activity:com.apple.backupd-auto:Delay 10800' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist
sudo /usr/libexec/PlistBuddy -c 'set :LaunchEvents:com.apple.xpc.activity:com.apple.backupd-auto:GracePeriod 5400' /System/Library/LaunchDaemons/com.apple.backupd-auto.plist
So it looks like just editing the file isn't enough anymore. Hope that helps.

~jr

http://www.johnrofrano.com
http://www.vasstsoftware.com



Return to posts index

Will Brook
Re: opening permissions on certain files on my own computer
on Mar 13, 2017 at 9:30:24 pm

Thank you, John, your response was very useful.

First off, I had found superuser.com's website, but I was looking to do the fix myself, not bring in another program to do it. This is my way of learning more about programming, Mac os, etc. I still have some work to do to gain control on my own of Timemachine, but I'm working at it.

Your note on copying, editing then moving the file back finally did work. The plist is edited. I had tried to copy, make the edits and then copy back, but it hadn't worked. I did it without the sudo command, just by changing permissions, and it hadn't let me make changes. Seems an obviously fix using sudo bit it hadn't clicked at the time. Thanks.

Also the script you provided in the second paragraph is the other thing for which I was looking. The use of ":" and how to write the command to edit specific sublevels within a plist.

Thanks again.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]