Installing remote vscode-server fails when I login as a nonroot user, but when I login as root it works. Ubuntu 22.04

27 views Asked by At

As the non-root user:

jainslie@host:~$ cat .vscode-server/.cli.903b1e9d8990623e3d7da1df3d33db3e42d80eda.log 
main: line 322: /home/jainslie/.vscode-server/code-903b1e9d8990623e3d7da1df3d33db3e42d80eda: Permission denied
jainslie@host:~$ 

jainslie@host:~$ ls -al .vscode-server/
total 20112
drwxr-x--- 5 jainslie jainslie     4096 Feb 28 13:14 .
drwxr-x--- 5 jainslie jainslie     4096 Feb 28 13:13 ..
drwxr-x--- 3 jainslie jainslie     4096 Feb 28 13:13 cli
-rw-r----- 1 jainslie jainslie      111 Feb 28 13:14 .cli.903b1e9d8990623e3d7da1df3d33db3e42d80eda.log
-rwxr-x--- 1 jainslie jainslie 20566712 Feb 28 13:13 code-903b1e9d8990623e3d7da1df3d33db3e42d80eda
drwx------ 6 jainslie jainslie     4096 Feb 28 13:13 data
drwx------ 2 jainslie jainslie     4096 Feb 28 13:13 extensions
jainslie@host:~$ 

root@host:~# ls -al .vscode-server/
total 20112
drwxr-x--- 5 root root     4096 Feb 28 12:33 .
drwx------ 9 root root     4096 Feb 28 13:11 ..
drwxr-x--- 3 root root     4096 Feb 28 12:32 cli
-rw-r----- 1 root root      648 Feb 28 12:33 .cli.903b1e9d8990623e3d7da1df3d33db3e42d80eda.log
-rwxrwxr-x 1 1000 1000 20566712 Feb 13 14:15 code-903b1e9d8990623e3d7da1df3d33db3e42d80eda
drwx------ 6 root root     4096 Feb 28 12:33 data
drwx------ 2 root root     4096 Feb 28 12:33 extensions

root@host:~# cat .vscode-server/.cli.903b1e9d8990623e3d7da1df3d33db3e42d80eda.log 
Listening on 127.0.0.1:37869
[2024-02-28 12:32:57] info Disposed of connection to running server.
looking for token 58794b8b-fe86-4c9c-bd47-9e2331673dcc, got Some("58794b8b-fe86-4c9c-bd47-9e2331673dcc")
[2024-02-28 12:32:57] info Checking /root/.vscode-server/cli/servers/Stable-903b1e9d8990623e3d7da1df3d33db3e42d80eda/log.txt and /root/.vscode-server/cli/servers/Stable-903b1e9d8990623e3d7da1df3d33db3e42d80eda/pid.txt for a running server...
[2024-02-28 12:32:58] info Downloading Visual Studio Code server -> /tmp/.tmpWQG6Lt/vscode-server-linux-x64.tar.gz
[2024-02-28 12:33:05] info Starting server...
[2024-02-28 12:33:05] info Server started

I have made sure the permissions are correct, that there are no firewalls running. Nothing else seems to make any sense.

0

There are 0 answers