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.66k stars 286 forks source link

[Remote-SSH Bug]: Unable to write to folder mounted with GCSFUSE #8775

Open cmessin1 opened 1 year ago

cmessin1 commented 1 year ago

Is there an existing issue for this bug?

Required Troubleshooting Steps

Connect Locally

It connects successfully

->

No response

Expected Behavior

Should be able to write files to Google Cloud Storage Buckets mounted as file system folder (with gcsfuse) by same user as is used for SSH and vscode remote SSH.

Steps To Reproduce

  1. GCP Instance, Ubuntu 22.04, GCSFUSE 1.0.0
  2. Mount Google Bucket with non-root user "gcsfuse bucket-name folder-name", also tried with "gcsfuse -o allow_other --file-mode=777 --dir-mode=777 bucket-name folder-name"
  3. Log in via ssh with same user that did above mount and no issues reading or writing to mounted bucket.
  4. Remote SSH from VSCode and can open files within bucket without issue. Cannot save files. No issues saving directly to user home directory. Interestingly when attempting to save, a file with the name is created but is blank. No issues saving files when using direct ssh outside of vscode.
  5. Get following error: "... Unable to write file 'vscode-remote://ssh-remote+_ipaddress/path (NoPermissions(FileSystemError): Error: EACCESS: permission denied ...

I have tried both localserver options and have tried with and without flock also tried both options for file lock location.

Remote-SSH Log

Remote-SSH Log

``` [11:40:07.703] Log Level: 2 [11:40:07.719] VS Code version: 1.80.2 [11:40:07.719] Remote-SSH version: remote-ssh@0.102.0 [11:40:07.719] win32 x64 [11:40:07.724] SSH Resolver called for "ssh-remote+34.123.89.146", attempt 1 [11:40:07.725] "remote.SSH.useLocalServer": false [11:40:07.725] "remote.SSH.showLoginTerminal": false [11:40:07.726] "remote.SSH.remotePlatform": {"54.90.114.249":"linux","35.224.153.247":"linux","34.134.237.250":"linux","34.70.10.235":"linux","34.123.89.146":"linux"} [11:40:07.726] "remote.SSH.path": undefined [11:40:07.727] "remote.SSH.configFile": undefined [11:40:07.727] "remote.SSH.useFlock": true [11:40:07.727] "remote.SSH.lockfilesInTmp": true [11:40:07.727] "remote.SSH.localServerDownload": auto [11:40:07.728] "remote.SSH.remoteServerListenOnSocket": true [11:40:07.728] "remote.SSH.showLoginTerminal": false [11:40:07.728] "remote.SSH.defaultExtensions": [] [11:40:07.728] "remote.SSH.loglevel": 2 [11:40:07.728] "remote.SSH.enableDynamicForwarding": true [11:40:07.729] "remote.SSH.enableRemoteCommand": false [11:40:07.729] "remote.SSH.serverPickPortsFromRange": {} [11:40:07.729] "remote.SSH.serverInstallPath": {} [11:40:07.735] SSH Resolver called for host: 34.123.89.146 [11:40:07.735] Setting up SSH remote "34.123.89.146" [11:40:07.740] Using commit id "2ccd690cbff1569e4a83d7c43d45101f817401dc" and quality "stable" for server [11:40:07.749] Install and start server if needed [11:40:07.753] Checking ssh with "C:\Program Files\Eclipse Adoptium\jdk-17.0.8.7-hotspot\bin\ssh.exe -V" [11:40:07.755] Got error from ssh: spawn C:\Program Files\Eclipse Adoptium\jdk-17.0.8.7-hotspot\bin\ssh.exe ENOENT [11:40:07.756] Checking ssh with "C:\Program Files\Eclipse Adoptium\jdk-11.0.17.8-hotspot\bin\ssh.exe -V" [11:40:07.757] Got error from ssh: spawn C:\Program Files\Eclipse Adoptium\jdk-11.0.17.8-hotspot\bin\ssh.exe ENOENT [11:40:07.757] Checking ssh with "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\ssh.exe -V" [11:40:07.759] Got error from ssh: spawn C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\ssh.exe ENOENT [11:40:07.759] Checking ssh with "C:\Program Files (x86)\VMware\VMware Player\bin\ssh.exe -V" [11:40:07.760] Got error from ssh: spawn C:\Program Files (x86)\VMware\VMware Player\bin\ssh.exe ENOENT [11:40:07.760] Checking ssh with "C:\Program Files\Python39\Scripts\ssh.exe -V" [11:40:07.762] Got error from ssh: spawn C:\Program Files\Python39\Scripts\ssh.exe ENOENT [11:40:07.762] Checking ssh with "C:\Program Files\Python39\ssh.exe -V" [11:40:07.763] Got error from ssh: spawn C:\Program Files\Python39\ssh.exe ENOENT [11:40:07.763] Checking ssh with "C:\Windows\System32\ssh.exe -V" [11:40:07.764] Got error from ssh: spawn C:\Windows\System32\ssh.exe ENOENT [11:40:07.765] Checking ssh with "C:\Windows\ssh.exe -V" [11:40:07.766] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [11:40:07.766] Checking ssh with "C:\Windows\System32\wbem\ssh.exe -V" [11:40:07.768] Got error from ssh: spawn C:\Windows\System32\wbem\ssh.exe ENOENT [11:40:07.768] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V" [11:40:07.770] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [11:40:07.770] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V" [11:40:07.809] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 [11:40:07.813] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 20299 "34.123.89.146" bash [11:40:07.818] Terminal shell path: C:\WINDOWS\System32\cmd.exe [11:40:08.075] > ]0;C:\WINDOWS\System32\cmd.exe [11:40:08.075] Got some output, clearing connection timeout [11:40:08.939] > 67a0520594e2: running [11:40:09.040] > Acquiring lock on /run/user/2001/vscode-remote-lock.chris.2ccd690cbff1569e4a83d7 > c43d45101f817401dc [11:40:09.080] > Found existing installation at /home/chris/.vscode-server/bin/2ccd690cbff1569e4a > 83d7c43d45101f817401dc... > Checking /home/chris/.vscode-server/.2ccd690cbff1569e4a83d7c43d45101f817401dc.lo > g and /home/chris/.vscode-server/.2ccd690cbff1569e4a83d7c43d45101f817401dc.pid f > or a running server > Looking for server with pid: 41272 [11:40:09.147] > Found running server... [11:40:09.169] > > * > * 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). > * > [11:40:09.544] > Checking server status on socket /run/user/2001/vscode-ssh-remote-server-sock-16 > 90645189 with curl [11:40:09.596] > 67a0520594e2: start > SSH_AUTH_SOCK==== > DISPLAY==== > webUiAccessToken==== > listeningOn==/run/user/2001/vscode-ssh-remote-server-sock-1690645189== > osReleaseId==ubuntu== > arch==x86_64== > vscodeArch==x64== > bitness==64== > tmpDir==/run/user/2001== > platform==linux== > unpackResult==== > didLocalDownload==0== > downloadTime==== > installTime==== > extInstallTime==== > serverStartTime==== > connectionToken==a1a1111a-1111-1111-111a-111a1a11a111== > 67a0520594e2: end [11:40:09.597] Received install output: SSH_AUTH_SOCK==== DISPLAY==== webUiAccessToken==== listeningOn==/run/user/2001/vscode-ssh-remote-server-sock-1690645189== osReleaseId==ubuntu== arch==x86_64== vscodeArch==x64== bitness==64== tmpDir==/run/user/2001== platform==linux== unpackResult==== didLocalDownload==0== downloadTime==== installTime==== extInstallTime==== serverStartTime==== connectionToken==a1a1111a-1111-1111-111a-111a1a11a111== [11:40:09.598] Remote server is listening on /run/user/2001/vscode-ssh-remote-server-sock-1690645189 [11:40:09.599] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"socketPath":"/run/user/2001/vscode-ssh-remote-server-sock-1690645189"},"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/2001","platform":"linux","connectionToken":"a1a1111a-1111-1111-111a-111a1a11a111"},"installUnpackCode":""} [11:40:09.608] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -L 127.0.0.1:20301:/run/user/2001/vscode-ssh-remote-server-sock-1690645189 "34.123.89.146" bash [11:40:09.617] Spawning tunnel with: type "C:\Users\jacko\AppData\Local\Temp\vscode-linux-multi-line-command-34.123.89.146-231619638.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -L 127.0.0.1:20301:/run/user/2001/vscode-ssh-remote-server-sock-1690645189 "34.123.89.146" bash [11:40:09.618] Terminal shell path: C:\WINDOWS\System32\cmd.exe [11:40:09.846] > ]0;C:\WINDOWS\System32\cmd.exe [11:40:10.732] > SSH_AUTH_SOCK= > Connected to SSH Host - Please do not close this terminal [11:40:10.732] Spawned SSH tunnel between local port 20301 and remote target /run/user/2001/vscode-ssh-remote-server-sock-1690645189 [11:40:10.732] Waiting for ssh tunnel to be ready [11:40:10.737] Tunneled /run/user/2001/vscode-ssh-remote-server-sock-1690645189 to local port 20301 [11:40:10.738] Resolved "ssh-remote+34.123.89.146" to "127.0.0.1:20301" [11:40:10.756] ------ ```

Anything else?

No response

MarcoPatane commented 7 months ago

Hi, any update on this? It would be useful to use gcsfuse together with ssh-remote. Thanks!