Sublime Text: Permission denied when running Sublime REPL by non-root user under Ubuntu
Asked Answered
R

6

5

When trying to run Sublime REPL, I get a message box with permission denied error: IOError(13, 'Permission denied') unless I launch Sublime Text with root privileges (sudo sublime). It holds for any REPL language.

I'm using Ubuntu 12.10, and Sublime resides in /opt/ directory.

Since I can't google anyone else having this problem, probably there's something special about my filesystem privileges somewhere. What can cause files that Sublime REPL use be protected?

Romano answered 3/1, 2013 at 1:44 Comment(0)
R
9

Ooof, that was silly. In ~/.config folder with Sublime settings, sublime-text-2 had root root owner, have no idea why. Had to change owner to myself with chown, and that's all.

Romano answered 4/1, 2013 at 0:3 Comment(4)
cd ~/.config; chown <username>:<username> sublime-text-2Romano
Geez! You can't imagine how much time I was looking for this answer. I'm running Linux Mint as guest of a Windows 7 host using VMWare and although the Shared Folders were correctly set I was unable to write/modify any file within Sublime because I was always receiving a Permission Denied error while other text editors (like GEdit) could write without problems. The only difference is I'm using ST3 and the folder name, obviously, changes too.Kira
more precisely: cd ~/.config; chown -R <username>:<username> sublime-textConfluent
@Bruno: Where can I find this file in Windows? I have a similar setupAccommodative
G
2

This error (reported on GitHub) may have some bearing on the behavior you're seeing. If I were you, I'd try to isolate a specific use case and then add it to the bug report so wuub might be able to advise you.

Granthem answered 3/1, 2013 at 15:53 Comment(0)
T
1

In your installation folder: opt/sublime_text

marcelo@ubuntu:~$ sudo su
[sudo] password for marcelo: *******
root@ubuntu:/home/marcelo#
root@ubuntu:/home/marcelo# cd ..
root@ubuntu:/home# cd ..
root@ubuntu:/# cd opt/sublime_text
root@ubuntu:/opt/sublime_text# chmod 777 sublime_text

Done..

Tender answered 2/9, 2014 at 2:39 Comment(0)
C
0

Reverting to a Freshly Installed State worked for me:

sudo mv ~/.config/sublime-text-3 ~/sublime-text-3
subl

It automatically creates a new copy of ~/.config/sublime-text-3 with your username as the owner. It should solve all the Permission denied kinds of problems.

Ctenophore answered 10/11, 2016 at 19:12 Comment(0)
L
0

Execute in the terminal

sudo chmod -R 777 ~/.config/sublime-text-3/

This will give all the permissions to the folders recursively

Leavelle answered 14/8, 2018 at 22:25 Comment(0)
H
0

Sometimes it's sublime-text-3, but sometimes it's sublime-text. The folder name may not be always the same. If -3 does not work, check if you have sublime-text folder there. If yes, replace the content of that.

Homeless answered 18/11, 2022 at 16:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.