posted by Isaac Reuben , updated 3 months ago , 33
If I open a file like /etc/hosts and then try to save it, it just says I don't have permission. In TextMate it will prompt and ask for a password to save (the first time, and then doesn't require again after that for changes to same file).


This was added in 2165
This is a huge hustle for me as well. I'm having to keep TextMate for this reason alone. 

 Agreed - have kept textmate around just for editing files like /etc/hosts - the way textmate prompts for elevated permissions on save is perfect.

Fantastic, I just installed the latest 2165 build and I can now edit /etc/hosts. Have just purchased a licence - thanks and keep up the great work!

Besides, it doesn't work even with sudo subl 

This feature is definitely needed!
Agreed. This is one hell of a feature in TextMate. sublime is a really cool editor for quickly editing a file or two. Sometimes that file will be only root-writable (like the apache config. or /etc/hosts). It's a shame that it's completely impossible to edit these kind of files with sublime ATM.
I'm experiencing the same issue on the Linux build, using build 2111. I, unfortunately, can't use TextMate, so I'm stuck with vim as an alternative.
I'm glad I didn't buy it yet. I decided to try it for a while and this finally came to me recently. I would not mind paying the asked price for a full featured text editor as it appeared to be. Without this, the price is not acceptable. Either the price goes down or the feature must be added.
This and the clumsy "Find" UI are the only things preventing me from switching at this point.
This has been added in the latest dev builds
@matrushka still waiting for it to appear on linux then.
This was added in 2165
This doesn't work on Ubuntu 11.10 64 bits wth ST version 2167.

Opening a file in /etc and trying to save it just pop a message: "Unable to save /etc/filename"
I'm on beta build 2181 (OS X 10.7.2) and it's not working for me. I just get an "Unable to save" message. Was a fix only done for the /etc directory?  Hope not.
I believe the problem people below are referring to the fact that Sublime Text 2 still doesn't allow you to save to read-only files (i.e. files that you do not have +w for.)

TextMate says "Couldn't Save: The file <FILENAME> is read-only. Attempt to overwrite?" and offers "Overwrite" and "Don't Overwrite" as options.

This does not appear to work in Windows 7.  It could be done with UAC escalation.
Same issue here, with Windows 8 CP. Found away around it by configuring Sublime Text 2 to always run as administrator, but I think this is semi-ideal. Quite dissapointing that this has not been fixed yet. I bought a license today for 60 bucks so I would expect something like this to work..
This isn't working at all with sublime-text 2 final (2218) on arch linux/gnome 3. Just says "unable to save file", for example on /etc/hosts it still does this...

Sublime can try to use UAC elevation to write the file

It does not prompt for files that do not exist already. ie subl /etc/somefile -- Unable to save. More details at http://sublimetext.userecho.com/topic/124701-prompt-for-elevated-permissions/

I'm on OS X

I was saving my files just fine, got prompted to purchase. I purchased a license and now it won't save anymore?!!!


Disappointed this has not been implemented for all OS's. It doesn't work on Windows 7 x64.

Looks like it's only been added for OS X.

This is a deal breaker for me.

For it to save in windows 7, you have to run sublime text as administrator. If you have the ST2 icon on the bottom start bar, Shift-right click on the sublime text 2 icon to get the run as administrator option.


I realise you can run it as admin to solve, but I don't want to run it as admin, and shouldn't have to. ST should automatically prompt for the admin password when saving to a folder that needs admin privileges (eg. like EmEditor)

This feature should have been implemented for all OS's rather than just for OS X.


As this has been marked completed, I have created a new suggestion topic here

Please up-vote this new topic if you want this feature implemented for all OS's.

My Mac OS version still doesn't have the ability to ask me for a superadmin password.


Just created a plugin solving this problem on windows and linux https://github.com/azubr/Superlime

As of build 3059, this has not been fixed.
PLEASE fix this natively! I like having `atomic_save`!
It doesn't work with 3062 64-bit on Linux.