0

i am mounting my folder with

sshfs pc:/dir dir

this works fine. When I go to the mounted directory and I want to open vs code with this command

code .

I get this error:

cannot open path of the current working directory: Permission denied

When I try to create a new file with nano test.txt and save it everything works fine and when I open vs code from my home directory and then open a folder and choose the mounted dir it works too. It does not work only when I want to open vs-code from command line.

3
  • it might be the implementation of . within sshfs. this might have to be a "I'll just live with that" problem. can you try running code <folder> from the parent directory?
    – Jad
    May 20, 2021 at 9:22
  • when I enter code mounted_dir/my_dir it works. Yes this seems to be the problem. Do you know how to fix it?
    – otto
    May 20, 2021 at 9:24
  • when I go to my mounted dir and enter code my_dir it does not work
    – otto
    May 20, 2021 at 9:25

1 Answer 1

0

Visual Studio code has a built in ssh extension which will run all the commands/debug on the remote machine, much like the WSL, Github and Heroku plugins.

There is also an sshfs plugin although I've never used it

If you need to use sshfs the way that you are doing, then you will need to work through by trial and error the options from the sshfs man page

I would suggest that you start with the ones to do with sync'ing caching and leave the "workaround" section till last

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.