When you’re trying to save or delete your Sublime Text files, the program may sometimes display Permission Denied errors. This indicates there might be a problem related to your account permission level.
In this guide, we’ll explore why Sublime Text says you don’t have the permission to save or delete your files and how you can fix this issue.
Troubleshooting Permissions Denied Errors in Sublime Text
1. Check your save location
If you’re using macOS and Ubuntu, you need special privileges to save your files in the root of the file system. If you don’t have the necessary permissions, you’ll get permission denied errors every time you try to save your files.
Create a new folder in your home directory and use that folder to save your files. In other words, save the files to a folder you have access to.
Your home directory is available under the /Users directory. It is named after your username and you should be able to quickly locate it if you go to the /Users directory and look after the icon of a house.
2. Create a new file
To bypass the permission denied error, you can also create a new file. Simply copy the whole content of the problematic file (that one that won’t save), and paste it in the new file.
Try to save the new file to see if you’re still getting the same error.
3. Delete the Git plugin
If you installed the Git plugin for Sublime Text, you may get the Permission Denied error if try to delete a file that’s hosted on GitHub.
As a workaround, you can delete the Git package and reinstall it. Go to Package Control: Disable Package, select Git.
There you have three solutions to troubleshoot permission errors in Sublime Text. Let us know if you managed to fix the problem.