Edit plist file for TextEdit

permissionplisttextedit

I need to edit plist file of TextEdit (TextEdit/Contents/plist.info) for doing this, using Xcode. But TextEdit says that I've got no permission for edit enter image description here

enter image description here

I've tried to get more permission for me, so I inscribed myself in GetInfo (Pasha is me). enter image description here

But still the same problem as on the pictures above. I was searching for an answer and found this. As you can see, this answer suggests me to do what I've already done. So I hope you know the different solution for this problem.

Best Answer

You also need to have write permission to the directory the file is in:

sudo chown $USER /Applications/TextEdit.app/Contents/Info.plist
sudo chown $USER /Applications/TextEdit.app/Contents

After you have edited the file, change the owner of the plist and the directory back to root:

sudo chown root /Applications/TextEdit.app/Contents/Info.plist
sudo chown root /Applications/TextEdit.app/Contents

You could also run cp /Applications/TextEdit.app/Contents/Info.plist ~/Desktop/ (which changes the owner to you), edit the file on the desktop, and then run sudo cp ~/Desktop/Info.plist /Applications/TextEdit.app/Contents/Info.plist (which changes the owner back to root).

Or use another editor:

sudo nano /Applications/TextEdit.app/Contents/Info.plist
Related Question