Sublime Text "Unable to save"

I just solved the same issue on Sublime Text 3 beta, Stable Channel Build 3065 by doing the following under Windows 7:

  1. Navigate to the Sublime Text 3 executable file, wherever you have it installed.
  2. Right-click it and select properties.
  3. Click on the tab marked "Security"
  4. About half way down the tab, on the right hand side, under the list of group and user names is this little button:

enter image description here

Click it.

  1. If your machine is setup the way I suspect it is (otherwise you probably would not be having this issue), you should be prompted for your administrator account credentials. Enter them.

enter image description here

  1. Now, select the Users group in the list, then take a look in the box at the bottom labeled 'Permissions for Users'. Put a check mark in the 'Allow' column for the 'Write' item.
  2. Click 'Apply'
  3. Click 'OK'

You should be set. What this does is it essentially gives Sublime the ability to write files while running with regular user privileges, no administrator level access required. Upon taking a better look at your error, what is happening is Sublime Text is creating a temp file for editing, rather than editing to file itself, then attempting to overwrite the original file with the temp on save. The problem is that the program is not being run by a user with sufficient privileges to perform the overwrite, hence the failure with an 'Access denied' message.


Go to the path where you installed sublime text 2 and...

  1. Right click on the sublime_text 2.exe file.
  2. Go to its properties.
  3. Go to compatibility section under this.
  4. Set its privilege level to "Run this program as an administrator".
  5. Now change settings for all users and there also check the field "Run this program as an administrator".
  6. Apply the changes.

seems it's because Windows or another program is blocking the file. Sublime text uses a temporal file instead of editing the file directly, and when you save the file uses a API command to move this edited file to the original, so this command has restrictions when one file is locked and Sublime shows this alert.

Maybe this setting {"atomic_save": false} will work for you.

Tags:

Sublimetext3