0

I'm trying to save a system file with ST3, /etc/hosts but it throws an error. On another mac machine it ask me for the password and saves normally, but on this new installation it just show this error:

Unable to save ...
Error: ... is readonly px_administrator_copy_file(/tmp/.sublbca.tmp, ...)

Any idas why is not asking for sudo password?

Arnold Roa
  • 7,335
  • 5
  • 50
  • 69

1 Answers1

1

There are two things you can try. First, try opening the file with sudo in the first place. To do this, you'll need to place a symlink to the subl shortcut in /usr/bin:

sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/bin/subl

Then, you can just run

sudo subl /etc/hosts

enter your password, and continue as normally.

Second, I'd highly recommend setting

"atomic_save": false

in your user preferences (Sublime Text -> Preferences -> Settings-User). The error you are getting is on a temp file created by atomic saving, and as I explain in the linked answer above, file metadata can get altered or lost when using this "feature", so it's best to just turn it off.

Community
  • 1
  • 1
MattDMo
  • 100,794
  • 21
  • 241
  • 231