Closed elelement closed 3 years ago
I've done some testing, trying to replicate this using my Ubuntu VM, but without luck.
The closest I got was more of a caching issue:
chown root:newgroup test
and chmod'd it to -rw-rw-r--
The extension still uses a connection where the test user wasn't part of newgroup
, hence it couldn't write to the file. If I started a new SSH connection (outside vscode) or restarted VSCode (closing the "stale" connection), I could edit the file.
I assume restarting VSCode doesn't solve your issue though? At this point, the only thing I can think of is that my way of connecting somehow doesn't inherit group membership. My Ubuntu VM doesn't seem to have this issue.
id
in a "working" terminal and in an extension terminal produce the same output?setfacl
or similar) on the files or (one of) their ancestors?Thank you for your comments. Restarting VS Code did, indeed, solve the problem. I did the group assignments after connecting the folder to my workspace.
Now, it works as expected. Thank you very much!
I've been posting on issue https://github.com/SchoofsKelvin/vscode-sshfs/issues/109, which is closed, but I think I'm facing the error described on it.
What I see is that you can only edit files belonging specifically to the user you configured to login in the plugin. In a normal ssh connection, through iTerm, for example, I am able to edit files using group permissions. In other words, if the user "pi" belongs to group openhab, I'll be able to edit files belonging to that group (664 permissions), even if "pi" is not the propietary. It seems to me, that this plugin is only checking that the file owner is equal to the logged in user.
Thank you for your time and your good work.
From the original post on #109:
Hello. I'm facing a similar issue, if not the same. I can edit files when logged in via terminal, but not through the plugin. This is what I'm trying to edit:
I'm logging in as "pi" user and it belongs to the "openhab" group:
sudo adduser pi openhab
Using vim or nano as "pi" allows me to edit the files (iTerm terminal), but the plugin doesn't. Even if I use the option "open a remote SSH terminal" it doesn't work:
Failed to save 'device_4.rules': Unable to write file 'ssh://openhab-config/rules/device_4.rules' (NoPermissions (FileSystemError): ssh://openhab-config/rules/device_4.rules)
E45: La opción 'readonly' está activada (añada "!" para forzar)
In the VS Code console I can see that the plugin logs in as "pi" user:pi@raspberrypi:/etc/openhab2$
There has to be something wrong with plugin. How can I enable some kind of debug log?
Thank you very much.