I mounted a remote server's drive through Nautilus. Login as ubuntu
(server account). Local user id is tianhe
.
I want to use sublime text CLI command (subl file_to_open
) to open files on remote server. But I get Permission denied
errors.
tianhe@tianhe-windy:/run/user/1000/gvfs/sftp:host=x.x.x.x/home/ubuntu/test$ subl .
cannot open path of the current working directory: Permission denied
However, I can open and create files through Nautilus, by right click the same remote folder -> Open With Other Application -> Choose Sublime Text.
Directory Permission see from server is:
ubuntu@VM-0-9-ubuntu:~/test$ ll
total 12
drwxrwxr-x 2 ubuntu ubuntu 4096 Jul 4 21:42 ./
drwxr-xr-x 8 ubuntu ubuntu 4096 Jul 4 21:23 ../
-rw-rw-r-- 1 ubuntu ubuntu 16 Jul 4 21:42 haha.txt
Directory Permission see from local is:
tianhe@tianhe-windy:/run/user/1000/gvfs/sftp:host=x.x.x.x/home/ubuntu/test$ ll
total 9
drwxrwxr-x 1 tianhe tianhe 4096 7月 4 21:42 ./
drwxr-xr-x 1 tianhe tianhe 4096 7月 4 21:23 ../
-rw-rw-r-- 1 tianhe tianhe 16 7月 4 21:42 haha.txt
tianhe@tianhe-windy:/run/user/1000/gvfs/sftp:host=x.x.x.x/home/ubuntu/test$ subl .
cannot open path of the current working directory: Permission denied
tianhe@tianhe-windy:/run/user/1000/gvfs/sftp:host=x.x.x.x/home/ubuntu/test$
What's wrong and how can I fix it?
Best Answer
I uninstalled the Sublime Text installed from Ubuntu Software and then reinstalled it according to the offcial doc from its official site, which essentially uses
apt
. And it works!