microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 290 forks source link

[Remote-SSH Bug]: main line 510 permission denied #8060

Closed nateinindy closed 1 year ago

nateinindy commented 1 year ago

Is there an existing issue for this bug?

Required Troubleshooting Steps

Connect Locally

It connects successfully

->

No response

Expected Behavior

It connects to the remote server.

Steps To Reproduce

Try to connect to remote server.

Remote-SSH Log

Remote-SSH Log

``` [09:52:02.805] Log Level: 2 [09:52:02.853] SSH Resolver called for "ssh-remote+..COM", attempt 1 [09:52:02.855] "remote.SSH.useLocalServer": false [09:52:02.856] "remote.SSH.showLoginTerminal": false [09:52:02.856] "remote.SSH.remotePlatform": {} [09:52:02.857] "remote.SSH.path": undefined [09:52:02.857] "remote.SSH.configFile": undefined [09:52:02.858] "remote.SSH.useFlock": true [09:52:02.858] "remote.SSH.lockfilesInTmp": false [09:52:02.859] "remote.SSH.localServerDownload": auto [09:52:02.859] "remote.SSH.remoteServerListenOnSocket": false [09:52:02.859] "remote.SSH.showLoginTerminal": false [09:52:02.860] "remote.SSH.defaultExtensions": [] [09:52:02.860] "remote.SSH.loglevel": 2 [09:52:02.861] "remote.SSH.enableDynamicForwarding": true [09:52:02.861] "remote.SSH.enableRemoteCommand": false [09:52:02.862] "remote.SSH.serverPickPortsFromRange": {} [09:52:02.862] "remote.SSH.serverInstallPath": {} [09:52:02.874] VS Code version: 1.75.0 [09:52:02.874] Remote-SSH version: remote-ssh@0.96.0 [09:52:02.874] win32 x64 [09:52:02.879] SSH Resolver called for host: ..COM [09:52:02.879] Setting up SSH remote "..COM" [09:52:02.910] Using commit id "e2816fe719a4026ffa1ee0189dc89bdfdbafb164" and quality "stable" for server [09:52:02.928] Install and start server if needed [09:52:06.487] Checking ssh with "ssh -V" [09:52:06.576] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 [09:52:06.586] Running script with connection command: ssh -T -D 55937 "..COM" bash [09:52:06.590] Terminal shell path: C:\WINDOWS\System32\cmd.exe [09:52:06.904] > ]0;C:\WINDOWS\System32\cmd.exe [09:52:06.905] Got some output, clearing connection timeout [09:52:07.566] > Y [09:52:07.587] > [09:52:08.541] > c479703dd07f: running [09:52:08.580] > Acquiring lock on /home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89 > bdfdbafb164/vscode-remote-lock..e2816fe719a4026ffa1ee0189dc89bdfdbafb164 [09:52:08.597] > Installing to /home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfd > bafb164... [09:52:08.612] > c479703dd07f%%1%% [09:52:08.713] > Downloading with wget [09:52:16.107] > wget download failed > failed: Connection timed out. > printenv: > LS_COLORS=:di=0;94: [09:52:16.114] > > LD_LIBRARY_PATH=/usr/local/lib: > CURRENT_DATE=20230216 > SSH_CONNECTION=10.189.150.169 55943 10.44.197.228 22 > CDC_PREW2KHOST= > PYENV_VIRTUALENV_DISABLE_PROMPT=1 > LANG=en_US.UTF-8 > PYENV_ROOT=/data/apps/python/.pyenv > EDITOR=nano > CDC_JOINED_ZONE= > PYENV_VIRTUALENV_INIT=1 > JAVA_HOME=/usr/lib/jvm/jre > CDC_LOCALHOST=..COM > S_COLORS=auto > which_declare=declare -f > XDG_SESSION_ID=7302 > USER= > SELINUX_ROLE_REQUESTED= > PWD=/home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb16 > 4 > HOME=/home/ > SSH_CLIENT=10.189.150.169 55943 22 > SELINUX_LEVEL_REQUESTED= > IMPALA_PYTHON_EXECUTABLE=/usr/bin/python > DA_SESSION_ID_AUTH=dcd36425-fa63-a342-8117-cb8e64234598 > SHELL=/bin/bash > SELINUX_USE_CURRENT_RANGE= > PYSPARK_DRIVER_PYTHON=/usr/bin/python3 > TMOUT=900 > LD_RUN_PATH=/usr/local/bin [09:52:16.122] > > CDC_JOINED_DC=..COM > SHLVL=2 > PYENV_SHELL=bash > CDC_JOINED_DOMAIN=.COM > VSCODE_AGENT_FOLDER=/home//.vscode-server > LOGNAME= > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/696258055/bus > XDG_RUNTIME_DIR=/run/user/696258055 > PYSPARK_PYTHON=/usr/bin/python3 > PATH=/usr/local/bin:/data/apps/python/.pyenv/plugins/pyenv-virtualenv/shims: > /data/apps/python/.pyenv/shims:/data/apps/python/.pyenv/bin:/home//.local > /bin:/home//bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/etc/al > ternatives/dmexpress/bin:/home//bin:/usr/lib/jvm/jre/bin:/opt/git/bin > USER_PRINCIPAL_NAME=@.COM > CDC_JOINED_SITE=Omaha > LESSOPEN=||/usr/bin/lesspipe.sh %s > BASH_FUNC_which%%=() { ( alias; > eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-fun > ctions --show-tilde --show-dot $@ > } > _=/usr/bin/printenv > OLDPWD=/home/ > Trigger local server download > c479703dd07f:trigger_server_download > platform==linux== [09:52:16.128] > > vscodeArch==x64== > destFolder==/home//.vscode-server/bin/== > destFolder2==e2816fe719a4026ffa1ee0189dc89bdfdbafb164== > c479703dd07f:trigger_server_download_end > Waiting for client to transfer server archive... > Waiting for /home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdba > fb164/vscode-scp-done.flag and vscode-server.tar.gz to exist > [09:52:16.129] Got request to download on client for {"platform":"linux","arch":"x64","destFolder":"/home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164"} [09:52:16.130] Downloading VS Code server locally... [09:52:49.835] Downloaded VS Code server to c:\Users\\AppData\Local\Temp\3\03d57d8d-f652-4599-9a37-a5ac146ab232 [09:52:49.838] Renamed VS Code server to c:\Users\\AppData\Local\Temp\3\vscode_server_1676559169835\vscode-server.tar.gz [09:52:49.846] Checking ssh with "ssh -V" [09:52:49.933] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 [09:52:49.940] Testing scp with "scp" [09:52:50.269] scp exited with code: 1 [09:52:50.269] Got stderr from scp: usage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file] [-J destination] [-l limit] [-o ssh_option] [-P port] [-S program] source ... target [09:52:50.270] Copying file to remote with scp "vscode-server.tar.gz" "vscode-scp-done.flag" "..COM":"/home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164" [09:52:50.270] Using cwd: file:///c%3A/Users//AppData/Local/Temp/3/vscode_server_1676559169835 [09:52:50.270] Terminal shell path: C:\WINDOWS\System32\cmd.exe [09:52:50.577] > ]0;C:\WINDOWS\System32\cmd.exe [09:52:51.282] > Y [09:52:51.288] > [09:52:52.351] > vscode-server.tar.gz 0% 0 0.0KB/s --:-- ETA [09:52:53.450] > vscode-server.tar.gz 4% 2672KB 2.4MB/s 00:25 ETA [09:52:54.383] > vscode-server.tar.gz 5% 3440KB 2.2MB/s 00:27 ETA [09:52:55.460] > vscode-server.tar.gz 6% 4336KB 2.1MB/s 00:28 ETA [09:52:56.439] > vscode-server.tar.gz 7% 5104KB 1.9MB/s 00:30 ETA [09:52:57.544] > vscode-server.tar.gz 9% 6000KB 1.8MB/s 00:31 ETA [09:52:58.476] > vscode-server.tar.gz 10% 6768KB 1.7MB/s 00:33 ETA [09:52:59.474] > vscode-server.tar.gz 11% 7536KB 1.6MB/s 00:34 ETA [09:53:00.559] > vscode-server.tar.gz 12% 8432KB 1.6MB/s 00:35 ETA [09:53:01.558] > vscode-server.tar.gz 14% 9200KB 1.5MB/s 00:37 ETA [09:53:02.501] > vscode-server.tar.gz 15% 9968KB 1.4MB/s 00:38 ETA [09:53:03.588] > vscode-server.tar.gz 16% 11MB 1.3MB/s 00:39 ETA [09:53:04.583] > vscode-server.tar.gz 17% 11MB 1.3MB/s 00:40 ETA [09:53:05.529] > vscode-server.tar.gz 18% 12MB 1.2MB/s 00:41 ETA [09:53:06.618] > vscode-server.tar.gz 20% 13MB 1.2MB/s 00:42 ETA [09:53:07.578] > vscode-server.tar.gz 21% 14MB 1.2MB/s 00:43 ETA [09:53:08.513] > vscode-server.tar.gz 22% 15MB 1.1MB/s 00:43 ETA [09:53:09.637] > vscode-server.tar.gz 24% 15MB 1.1MB/s 00:44 ETA [09:53:10.576] > vscode-server.tar.gz 25% 16MB 1.1MB/s 00:45 ETA [09:53:11.693] > vscode-server.tar.gz 26% 17MB 1.0MB/s 00:45 ETA [09:53:12.635] > vscode-server.tar.gz 27% 18MB 1.0MB/s 00:45 ETA [09:53:13.586] > vscode-server.tar.gz 28% 18MB 1.0MB/s 00:46 ETA [09:53:14.689] > vscode-server.tar.gz 30% 19MB 986.0KB/s 00:46 ETA [09:53:15.631] > vscode-server.tar.gz 31% 20MB 968.8KB/s 00:46 ETA [09:53:16.582] > vscode-server.tar.gz 32% 21MB 952.8KB/s 00:46 ETA [09:53:17.693] > vscode-server.tar.gz 34% 22MB 938.2KB/s 00:45 ETA [09:53:18.634] > vscode-server.tar.gz 35% 22MB 925.9KB/s 00:45 ETA [09:53:19.760] > vscode-server.tar.gz 36% 23MB 912.7KB/s 00:45 ETA [09:53:20.715] > vscode-server.tar.gz 37% 24MB 902.0KB/s 00:45 ETA [09:53:21.742] > vscode-server.tar.gz 38% 25MB 886.6KB/s 00:44 ETA [09:53:22.686] > vscode-server.tar.gz 40% 26MB 879.2KB/s 00:44 ETA [09:53:23.786] > vscode-server.tar.gz 41% 26MB 872.8KB/s 00:43 ETA [09:53:24.732] > vscode-server.tar.gz 42% 27MB 866.6KB/s 00:43 ETA [09:53:25.711] > vscode-server.tar.gz 43% 28MB 858.4KB/s 00:42 ETA [09:53:26.792] > vscode-server.tar.gz 45% 29MB 855.6KB/s 00:41 ETA [09:53:27.732] > vscode-server.tar.gz 46% 30MB 851.6KB/s 00:41 ETA [09:53:28.877] > vscode-server.tar.gz 47% 30MB 844.7KB/s 00:40 ETA [09:53:29.811] > vscode-server.tar.gz 48% 31MB 842.6KB/s 00:39 ETA [09:53:30.750] > vscode-server.tar.gz 50% 32MB 840.1KB/s 00:38 ETA [09:53:31.843] > vscode-server.tar.gz 51% 33MB 838.0KB/s 00:37 ETA [09:53:32.814] > vscode-server.tar.gz 52% 34MB 833.3KB/s 00:37 ETA [09:53:33.831] > vscode-server.tar.gz 53% 34MB 825.5KB/s 00:36 ETA [09:53:34.767] > vscode-server.tar.gz 55% 35MB 825.1KB/s 00:35 ETA [09:53:35.837] > vscode-server.tar.gz 56% 36MB 826.2KB/s 00:34 ETA [09:53:36.768] > vscode-server.tar.gz 57% 37MB 826.1KB/s 00:33 ETA [09:53:37.981] > vscode-server.tar.gz 58% 38MB 817.4KB/s 00:32 ETA [09:53:38.872] > vscode-server.tar.gz 60% 38MB 821.9KB/s 00:31 ETA [09:53:39.860] > vscode-server.tar.gz 61% 39MB 817.4KB/s 00:30 ETA [09:53:40.806] > vscode-server.tar.gz 62% 40MB 816.7KB/s 00:30 ETA [09:53:41.948] > vscode-server.tar.gz 63% 41MB 813.6KB/s 00:29 ETA [09:53:42.888] > vscode-server.tar.gz 65% 41MB 813.8KB/s 00:28 ETA [09:53:43.832] > vscode-server.tar.gz 66% 42MB 813.8KB/s 00:27 ETA [09:53:44.955] > vscode-server.tar.gz 67% 43MB 812.2KB/s 00:26 ETA [09:53:45.896] > vscode-server.tar.gz 68% 44MB 812.8KB/s 00:25 ETA [09:53:46.839] > vscode-server.tar.gz 69% 45MB 812.8KB/s 00:24 ETA [09:53:47.945] > vscode-server.tar.gz 71% 45MB 812.6KB/s 00:23 ETA [09:53:48.887] > vscode-server.tar.gz 72% 46MB 812.9KB/s 00:22 ETA [09:53:49.980] > vscode-server.tar.gz 73% 47MB 813.6KB/s 00:21 ETA [09:53:50.961] > vscode-server.tar.gz 75% 48MB 810.6KB/s 00:20 ETA [09:53:52.033] > vscode-server.tar.gz 76% 49MB 812.9KB/s 00:18 ETA [09:53:53.019] > vscode-server.tar.gz 77% 49MB 809.7KB/s 00:18 ETA [09:53:53.954] > vscode-server.tar.gz 78% 50MB 810.8KB/s 00:17 ETA [09:53:55.032] > vscode-server.tar.gz 80% 51MB 812.8KB/s 00:16 ETA [09:53:56.028] > vscode-server.tar.gz 81% 52MB 808.7KB/s 00:15 ETA [09:53:56.948] > vscode-server.tar.gz 82% 53MB 811.3KB/s 00:14 ETA [09:53:58.083] > vscode-server.tar.gz 83% 53MB 809.1KB/s 00:13 ETA [09:53:59.044] > vscode-server.tar.gz 84% 54MB 794.8KB/s 00:12 ETA [09:54:00.116] > vscode-server.tar.gz 86% 55MB 798.9KB/s 00:11 ETA [09:54:01.099] > vscode-server.tar.gz 87% 56MB 797.2KB/s 00:10 ETA [09:54:02.119] > vscode-server.tar.gz 88% 56MB 792.6KB/s 00:09 ETA [09:54:03.097] > vscode-server.tar.gz 89% 57MB 792.0KB/s 00:08 ETA [09:54:04.106] > vscode-server.tar.gz 90% 58MB 789.0KB/s 00:07 ETA [09:54:05.044] > vscode-server.tar.gz 92% 59MB 791.9KB/s 00:06 ETA [09:54:06.133] > vscode-server.tar.gz 93% 60MB 795.0KB/s 00:05 ETA [09:54:07.060] > vscode-server.tar.gz 94% 60MB 798.3KB/s 00:04 ETA [09:54:08.181] > vscode-server.tar.gz 95% 61MB 798.3KB/s 00:03 ETA [09:54:09.110] > vscode-server.tar.gz 97% 62MB 801.1KB/s 00:02 ETA [09:54:10.191] > vscode-server.tar.gz 98% 63MB 804.1KB/s 00:01 ETA [09:54:11.113] > vscode-server.tar.gz 99% 64MB 806.9KB/s 00:00 ETA [09:54:13.700] > vscode-server.tar.gz 100% 64MB 803.2KB/s 01:21 [09:54:13.723] > [09:54:13.774] > vscode-scp-done.flag 0% 0 0.0KB/s --:-- ETA [09:54:13.849] > vscode-scp-done.flag 100% 9 0.1KB/s 00:00 [09:54:13.861] > [09:54:15.202] "Copy server to host" terminal command done [09:54:16.230] > Found flag and server on host [09:54:16.240] > c479703dd07f%%2%% > tar --version: > tar (GNU tar) 1.30 > Copyright (C) 2017 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later . [09:54:16.246] > > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > Written by John Gilmore and Jay Fenlason. [09:54:17.640] > Checking /home//.vscode-server/.e2816fe719a4026ffa1ee0189dc89bdfdbafb164. > log and /home//.vscode-server/.e2816fe719a4026ffa1ee0189dc89bdfdbafb164.p > id for a running server [09:54:17.717] > Running ssh connection command... /home//.vscode-server/bin/e2816fe719a40 > 26ffa1ee0189dc89bdfdbafb164/bin/code-server --start-server --host=127.0.0.1 --ac > cept-server-license-terms --enable-remote-auto-shutdown --port=0 --telemetry-lev > el all &> "/home//.vscode-server/.e2816fe719a4026ffa1ee0189dc89bdfdbafb > 164.log" < /dev/null > printenv: > LS_COLORS=:di=0;94: > LD_LIBRARY_PATH=/usr/local/lib: > CURRENT_DATE=20230216 > SSH_CONNECTION=10.189.150.169 55943 10.44.197.228 22 > CDC_PREW2KHOST= > PYENV_VIRTUALENV_DISABLE_PROMPT=1 > LANG=en_US.UTF-8 > PYENV_ROOT=/data/apps/python/.pyenv > EDITOR=nano > CDC_JOINED_ZONE= > PYENV_VIRTUALENV_INIT=1 > JAVA_HOME=/usr/lib/jvm/jre > CDC_LOCALHOST=..COM > S_COLORS=auto [09:54:17.722] > > which_declare=declare -f > XDG_SESSION_ID=7302 > USER= > SELINUX_ROLE_REQUESTED= > PWD=/home/ > HOME=/home/ > SSH_CLIENT=10.189.150.169 55943 22 > SELINUX_LEVEL_REQUESTED= > IMPALA_PYTHON_EXECUTABLE=/usr/bin/python > DA_SESSION_ID_AUTH=dcd36425-fa63-a342-8117-cb8e64234598 > SHELL=/bin/bash > SELINUX_USE_CURRENT_RANGE= > PYSPARK_DRIVER_PYTHON=/usr/bin/python3 > TMOUT=900 > LD_RUN_PATH=/usr/local/bin > CDC_JOINED_DC=..COM > SHLVL=2 > PYENV_SHELL=bash > CDC_JOINED_DOMAIN=.COM > VSCODE_AGENT_FOLDER=/home//.vscode-server > LOGNAME= > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/696258055/bus > XDG_RUNTIME_DIR=/run/user/696258055 > PYSPARK_PYTHON=/usr/bin/python3 > PATH=/usr/local/bin:/data/apps/python/.pyenv/plugins/pyenv-virtualenv/shims: > /data/apps/python/.pyenv/shims:/data/apps/python/.pyenv/bin:/home//.local > /bin:/home//bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/etc/al > ternatives/dmexpress/bin:/home//bin:/usr/lib/jvm/jre/bin:/opt/git/bin > USER_PRINCIPAL_NAME=@.COM > CDC_JOINED_SITE=Omaha > LESSOPEN=||/usr/bin/lesspipe.sh %s > BASH_FUNC_which%%=() { ( alias; > eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-fun > ctions --show-tilde --show-dot $@ > } > _=/usr/bin/printenv > OLDPWD=/home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbaf > b164 [09:54:17.730] > > rm: cannot remove '/home//.vscode-server/.e2816fe719a4026ffa1ee0189dc89bd > fdbafb164.token': No such file or directory > Spawned remote server: 648435 [09:54:17.737] > > Waiting for server log... [09:54:17.751] > [09:54:17.787] > Waiting for server log... [09:54:32.017] > Waiting for server log... [09:54:32.054] > > * > * Visual Studio Code Server > * > * By using the software, you agree to > * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-lice > nse) and > * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacyst > atement). > * > [09:54:32.067] > > Server did not start successfully. Full server log at /home//.vscode-serv > er/.e2816fe719a4026ffa1ee0189dc89bdfdbafb164.log >>> > main: line 510: /home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bd > fdbafb164/bin/code-server: Permission denied > <<< End of server log > c479703dd07f: start > exitCode==32== > listeningOn==== [09:54:32.072] > > osReleaseId==rhel== > arch==x86_64== > tmpDir==/run/user/696258055== > platform==linux== > unpackResult==success== > didLocalDownload==1== > downloadTime==== > installTime==1366== > extInstallTime==== > serverStartTime==14329== [09:54:32.126] > c479703dd07f: end [09:54:32.126] Received install output: exitCode==32== listeningOn==== osReleaseId==rhel== arch==x86_64== tmpDir==/run/user/696258055== platform==linux== unpackResult==success== didLocalDownload==1== downloadTime==== installTime==1366== extInstallTime==== serverStartTime==14329== [09:54:32.129] Resolver error: Error: The VS Code Server failed to start at g.ServerInstallError (c:\Users\\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:584081) at f (c:\Users\\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:578291) at t.handleInstallOutput (c:\Users\\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:581316) at t.tryInstall (c:\Users\\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:680758) at async c:\Users\\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:643114 at async t.withShowDetailsEvent (c:\Users\\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:646432) at async t.resolve (c:\Users\\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:644164) at async c:\Users\\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:721750 [09:54:32.141] ------ [09:54:33.749] "install" terminal command done [09:54:33.749] Install terminal quit with output: ```

Anything else?

No response

eleanorjboyd commented 1 year ago

Hi! Can you Kill VS Code Server on Remote.... That might help it reset. If not can you check the permissions on the file: /home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/code-server . Thanks

nateinindy commented 1 year ago

Yeah, I have done the kill on remote. repeat to same error. image

eleanorjboyd commented 1 year ago

Can you check the permissions on the file?

nateinindy commented 1 year ago

image

eleanorjboyd commented 1 year ago

Hello! It seems from my understanding of permissions that for you this file has read, write, and execute for the owner of the file. Looking at my file permissions for the same file on my machine I have -rwxr-xr-x so there seems to be a difference there. I am not sure if the other parts of my permissions (like execute and write for group permissions) are necessary but that could make a difference. Therefore I have 3 thoughts:

  1. Do you change your umask value anywhere? This would change the default permissions for new files
  2. do you change users at all in your bash or at any point after connecting?
  3. ssh via your terminal to this file and see if you can run it from whatever user you are doing so with the extension- this could help you understand what about the permissions are different / the same when connecting with the extension

thanks!

eleanorjboyd commented 1 year ago

reference for my understanding of file permissions: image

nateinindy commented 1 year ago
  1. looks like my umask is 027
  2. no, i use same user for both local and remote
  3. i get permission denied. could this be an selinux issue? see output below
[user@server ~]$ umask
0027
[user@server ~]$ ls -alZ .vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/code-server
-rwx------. 1 myuser myuser unconfined_u:object_r:user_home_t:s0 249 Feb  1 10:27 .vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/code-server
[user@server~]$ .vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/code-server
-bash: .vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/code-server: Permission denied
eleanorjboyd commented 1 year ago

027 is more restrictive that 022 (which should be the default on most machines). Could you investigate why your umask value might have changed and revert it to see if that helps? Since you can't access the file as the user you are in from the command line it seems something about files created by the user that connects via SSH and downloads the files is not aligning with accessibility to read it.

nateinindy commented 1 year ago

Ugh, I added "umask 0022" to my .bashrc profile and tested that it indeed changes my umask and it does. I then killed the remote server and reset up my ssh connection, which installed the vscode-server on the remote. HOWEVER, it failed to start with the same error. As well the "code-server" file has the same permissions on it 700.

even if i change the perms on that file to 755, it still fails with same error.

From my initial log output above, what is the significance of this line? main: line 510: /home//.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bd

nateinindy commented 1 year ago

Any further thoughts? Appreciate the help thus far.

pwm1234-sri commented 1 year ago

I have the same problem. The remote computer I am trying to connect to is RHEL 8 with selinux. I see the following error in the Remote - SSH output:

[20:59:13.071] > Server did not start successfully. Full server log at /home/e27290/.vscode-serve
> r/.92da9481c0904c6adfe372c12da3b7748d74bdcb.log >>>
> main: line 510: /home/me/.vscode-server/bin/92da9481c0904c6adfe372c12da3b774
> 8d74bdcb/bin/code-server: Permission denied
> <<< End of server log
eleanorjboyd commented 1 year ago

Hi @nateinindy, I am not a linux expert and have exhausted all the ideas my coworker and I had regarding this issue. Hopefully, with someone else who has this, you might be able to compare settings and determine a root similarity. Best of luck!

nateinindy commented 1 year ago

I found that our /home in linux is mounted as "noexec", so i was able to change where it tried to install the .vscode-server on the remote by setting the "Remote.SSH: Server Install Path". This allowed the install to get much further down the line, however, it now dies at a different error (channel 3: open failed: administratively prohibited: open failed). see below log output.

..................... Spawned remote server: 1385859 Waiting for server log... Waiting for server log...

*

c008dc9c8952: start SSH_AUTH_SOCK==== DISPLAY==== webUiAccessToken==== listeningOn==15941== osReleaseId==rhel== arch==x86_64== tmpDir==/run/user/696258055== platform==linux== unpackResult==success== didLocalDownload==1== downloadTime==== installTime==1355== extInstallTime==== serverStartTime==96== connectionToken==1e290b25-a568-4c8a-9e8d-5fbf8cccaae6== c008dc9c8952: end channel 3: open failed: administratively prohibited: open failed channel 3: open failed: administratively prohibited: open failed

roblourens commented 1 year ago

The typical cause for that error message is that tcp port forwarding is not enabled on your ssh server, is that possible?

github-actions[bot] commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

phatblinkie commented 1 year ago

this will fix it mount -o remount,exec /home its the dumbest thing, to not allow users to run bins from thier own home, but yeah.

nateinindy commented 1 year ago

Sure, but if someone deliberately set /home to noexec, there is likely a good reason. In my case it is a Security Requirement, so I can not change it.