Closed z5267282 closed 2 years ago
Can you post the SSH FS
log? It is available under Output > SSH FS
. While it should censor passwords/passphrases, I recommend checking it for (other) sensitive data first.
It does try to open /import/cage/5/z5267282/test.c
, but fails while trying to fs.stats
it. I assume your user has permission to list the files with e.g. permissions in that directory?
Here's the log
I am pretty sure I have permissions to write on test.c
Ah, you only have a terminal open for the remote server, you didn't add it as a workspace folder? This is probably due to an old VS Code bug I wrote a specific solution for, which doesn't like accessing files for "non-folder" connections.
Can you get the latest .vsix
from here and test it? You can drag the .vsix
file into the Extensions pane or use the Extensions: Install from VSIX
command. Don't forget to reload the window afterwards.
Yep that's worked perfectly:
Before I installed the .vsix if I first added the home directory of my remote server as a workspace folder, the code command would work.
And then after installing the latest .vsix the code command works even if I don't open the workspace folder first.
Thanks!
[Had to repost because I forgot to redact some info from the pictures]
Not sure what happened but recently I've been getting "Couldn't start terminal: Permission denied" errors when using the flag. If I remove the flag, I can connect just fine but as soon as I add the "REMOTE_COMMANDS" flag I get the error.
I tried installing the latest .vsix (this one https://github.com/SchoofsKelvin/vscode-sshfs/actions/runs/1276056771) but the error still persists.
This is the output of the extension
@z5267282 Do you have access to write files in /tmp
? (and if not, where else? only within your home directory?)
I think I can write files to /tmp
I definitely have write access in my home directory
Yep, I downloaded build 74 and here are the logs
That error is indeed from writing to /tmp
. I write to a file starting with .Kelvin_
so you'd have to use ls -a
to find it.
I assume you're working on a school server with several users, including other users of this extension? The extension uses the static path /tmp/.Kelvin_sshfs
(with permissions 666 which should include write), meaning that another user with REMOTE_COMMANDS
enabled might've already created that file and have ownership over it. And somehow the ssh2
library might try to delete-and-recreate the file instead of just changing the contents. Only stumbled upon this potential issue while working with multiple test users myself.
I've made it that each user gets its own file (69c2370), you can check whether build 83 or later solves this for you. Assuming it is a multi-user issue.
Ah that's worked now I can login and the code command also works (also did not need to open remote folder still which is good).
I can also see the folder in /tmp/.Kelvin_
That's right as well, I am connecting to a uni server where each student has their own directory but I think /tmp is shared.
Thanks,
I tried to use the code command by enabling the REMOTE_COMMANDS flag in my user settings json file. When I use the code command 'Command sent to SSH FS extension' gets printed out, but I get an 'EntryNotFound' error.
How can this be fixed? Thanks