WSL: Not able to browse files with explorer.exe if the directory was mounted with SSHFS
Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.
If you have a feature request, please post to the UserVoice.
If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.
Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to secure@microsoft.com. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".
Please fill out the below information:
- Your Windows build number: (Type
verat a Windows Command Prompt)
Microsoft Windows [Version 10.0.18917.1000]
- What you’re doing and what’s happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
Mounting a directory with sshfs in WSL2 and browsing it using explorer.exe.
sudo apt-get update
sudo apt-get install -y sshfs
mkdir directory_for_testing_fuse
sudo sshfs -o allow_other root@xxx.xxx.xx.xx:/ ./directory_for_testing_fuse
ls directory_for_testing_fuse
cd directory_for_testing_fuse
explorer.exe .
“This folder is empty”
- What’s wrong / what should be happening instead:
I should see the files (root, home, etc, dev…) as they are listed in WSL
- Strace of the failing command, if applicable: (If
some_commandis failing, then runstrace -o some_command.strace -f some_command some_args, and link the contents ofsome_command.stracein a gist here).
No command is failing. So no trace available.
- For WSL launch issues, please collect detailed logs.
See our contributing instructions for assistance.
I wonder if this is a bug report or a feature request. Should we expect this scenario to work with WSL2 ?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 8
- Comments: 16 (2 by maintainers)
I’m glad to have fuse working in WSL 2. Huge thank you to everyone involved for making it a reality.
Just so people know I’m running.
Microsoft Windows [Version 10.0.19030.1]I can open explorer fine so as far I’m concerned it’s fixed (if it was broken)
I will post my mount command for people in case it helps.
sshfs -o allow_other,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,cache_timeout=3600 user@host.com:/home/user/ /mnt/sshfs/Thank you @benhillis
EDIT: Forgot to add, you need to use allow_other and to do that you need to edit /etc/fuse.conf and uncomment allow_other there.
Thanks for the quick response. I’ll wait then.
WSL 2 is awesome. You guys rock.
I have a change in CR right now that makes this work. Stay tuned for an upcoming Insiders build.
Thanks for filing this issue, this is due to how we isolated DrvFs mounts for admin / non admin access via mount namespaces. I have some ideas how to solve this in a future update.
How are you trying to unmount it? I’m assuming
fusermount -zu /mnt/whatever@alexbogun You are using WSL1 because it shows the build number 18945. Fuse should work in WSL2 and if it doesn’t at least it would say “modprobe: FATAL: Module fuse not found in directory /lib/modules/4.19.55-microsoft-standard”