0

I want to edit some com.myApp.plist. I'm running OS 10.10.3, and I do have Xcode installed. But every time I try to edit the file, it's locked and I can't save my changes.

If I try to save it with Xcode, Xcode asks if I want to unlock it. I say "Unlock", but then an error says The file "com.myApp.plist" could not be unlocked."; it says that this is because I do not own it.

If I open the file in Sublime Text, its just the object code.

How can I make changes to the file?

I have tried sudo chown $USER com.myApp.plist followed by sudo chmod u+w com.myApp.plist. They both succeed but I still can't edit the file.

I have tried using Finder to change each folder in the path to add me as a read/write user, but still no editing capability.

I have tried opening the file from Terminal using sudo com.myApp.plist which opens Xcode. Doesn't work.

Not sure what else to do. I could try something like "apply to enclosing folders" but that seems dangerous.

5
  • 1
    Why are you trying to edit something in the receipts folder? Its purpose is to provide a record of what was installed on the computer,and if you edit its contents they won't be accurate anymore. You can't change the actual install history; why are you trying to change the records about what happened? Apr 10, 2015 at 16:29
  • I'm developing an OS X app and I'm trying different things to keep my licensing procedures from being cracked.
    – nodebase
    Apr 10, 2015 at 16:32
  • Have you tried save-as to your desktop and then move it over? Apr 10, 2015 at 21:57
  • Wow that never occurred to me. It worked.
    – nodebase
    Apr 10, 2015 at 22:39
  • possible duplicate of How do I edit a Info.plist file?
    – John K
    Apr 20, 2015 at 11:25

2 Answers 2

0

The main reason that chmod didn't remove the lock is because you didn't have permission in the enclosing folder. It's like in a real world example: You cannot access a package in a room that you can only see to, and don't have the keys to.

Simple Answer:

Click once on the file, copy it. Then paste it into your desktop. Edit it. The lock will not be there. Then, just plop it back into private/var/db This will ask for your admin authentication.

Less simple answer with use of terminal:

Before you dive in, make sure you edit every path to the path that your .plist is actually in

First, get info on enclosing folder, say that it is right in /private/var/dbThen db would be the enclosing folder So:

chmod -R 777 /private/var/db

Then Open up terminal and execute:

sudo chmod 777 /private/var/db/somefile.plist
0

You probably need to add an ACL to the immediately enclosing folder too.

Not certain about the entire path, but you could always later remove with
sudo chmod -R -N /path… at the highest directory level you reached to enable it, which will remove ACLs from the entire directory tree at & below your /path...

4
  • Could you be more specific in what command I should execute?
    – nodebase
    Apr 10, 2015 at 16:23
  • tbh, I don't trust myself that much in Terminal - I'd just grab the folder, get info & add 'me' to the perms with 'read & write'
    – Tetsujin
    Apr 10, 2015 at 16:28
  • That doesn't work either.
    – nodebase
    Apr 10, 2015 at 16:29
  • You might need to work your way right to the top of the tree
    – Tetsujin
    Apr 10, 2015 at 16:29

You must log in to answer this question.

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