vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Error while editing file - NoPermissions (FileSystemError): Error: EACCES: permission denied

Open Sanket-Tantia opened this issue 3 years ago • 5 comments

  • VSCode Version: 1.67.0
  • Local OS Version: Windows 10
  • Remote OS Version: v0.234.0
  • Remote Extension/Connection Type: SSH
  • Logs:

Steps to Reproduce:

  1. Have a remote host with two users (user1 & user2)
  2. Create a file where the owner of the file is user1
  3. Restrict write permission of the file to the owner or group only. (-rw-rw-r)
  4. Create a group and add both user user1 & user2 and ensure that group is mapped to the above created file
  5. Since user2 is part of the group, he should be able to edit the file.
  6. Connect to remote host using user2 from VSC, getting the permission denied error.

Checked user2 is able to edit the file through other ssh agents like putty, mobaxterm.

Does this issue occur when you try this locally?: NA Does this issue occur when you try this locally and all extensions are disabled?: NA

Sanket-Tantia avatar May 07 '22 16:05 Sanket-Tantia

@bpasero not sure if you're the right person to ask for advice but I don't know in detail how our file editing works

tanhakabir avatar May 10 '22 06:05 tanhakabir

The workbench core file service is not doing anything special with regards to permissions: it writes from the server process of the remote server and that one probably runs with some user and some set of permissions. In other words, the file service can only leverage permissions that it gets by running as part of the server process, so I feel this belongs in the area of how the server is started (i.e. from what user).

bpasero avatar May 27 '22 05:05 bpasero

  • VSCode Version: 1.67.0
  • Local OS Version: Windows 10
  • Remote OS Version: v0.234.0
  • Remote Extension/Connection Type: SSH
  • Logs:

Steps to Reproduce:

  1. Have a remote host with two users (user1 & user2)
  2. Create a file where the owner of the file is user1
  3. Restrict write permission of the file to the owner or group only. (-rw-rw-r)
  4. Create a group and add both user user1 & user2 and ensure that group is mapped to the above created file
  5. Since user2 is part of the group, he should be able to edit the file.
  6. Connect to remote host using user2 from VSC, getting the permission denied error.

Checked user2 is able to edit the file through other ssh agents like putty, mobaxterm.

Does this issue occur when you try this locally?: NA Does this issue occur when you try this locally and all extensions are disabled?: NA

similar issue. @Sanket-Tantia have you found any solution ?

9643826476 avatar Jun 17 '22 12:06 9643826476

Hi, same here. Does anybody have a solution for this? chown -R is not an option for me, I have to be able to save files from VSC over SSH by being part of the group which has rw permission to the file being saved (and the folder containing it)

k3net avatar Jul 08 '22 11:07 k3net

Hi, same here. Does anybody have a solution for this? chown -R is not an option for me, I have to be able to save files from VSC over SSH by being part of the group which has rw permission to the file being saved (and the folder containing it)

same issue, have you found any solution? @k3net

PeiLeizzz avatar Aug 03 '22 10:08 PeiLeizzz

Sharing the log from the Remote-SSH output channel might help. However there is probably not much that we can do to help here. The server should be started as whatever user was used to ssh to the remote.

roblourens avatar Dec 06 '22 17:12 roblourens