WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Unable to access WSL mounted disk (\\wsl.localhost\Ubuntu\mnt\c) from File Explorer due to Permission Denied

Open MaurizioCasciano opened this issue 1 year ago • 7 comments

Windows Version

Microsoft Windows [Version 10.0.19045.4046]

WSL Version

2.0.14.0

Are you using WSL 1 or WSL 2?

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04

Other Software

File Explorer

Repro Steps

  1. Install WSL 2
  2. Try to open \\wsl.localhost\Ubuntu\mnt\c from File Explorer

Expected Behavior

File Explorer should allow to open such mounted disk.

Actual Behavior

File Explorer returns a permission denied when trying to open the \\wsl.localhost\Ubuntu\mnt\c directory.

Diagnostic Logs

No response

MaurizioCasciano avatar Feb 28 '24 15:02 MaurizioCasciano

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Feb 28 '24 15:02 github-actions[bot]

What's the default users configured in your distro ? If that user doesn't have access to the mount point, that can explain this error.

OneBlue avatar Feb 28 '24 18:02 OneBlue

The username is the one I created during WSL installation. From WSL I can list all the dir and files under /mnt/d and the WSL user matches both the owner and the group, however I get a Permission denied for the System Volume Information. image

MaurizioCasciano avatar Feb 28 '24 23:02 MaurizioCasciano

Same here. It used to work like 2 days ago, now I cannot use the WSL-based Python venv that I have created using PyCharm, since the directories appear to be empty.

Acrobot avatar Apr 01 '24 11:04 Acrobot

我也有同样的问题。 我在Windows的pycharm中调试代码时,程序不能访问/mnt/d下的资源。但是在WSL2中,确可以正常访问/mnt/d下的所有内容。 我尚不清楚如何解决。

zhangs-a-n avatar Sep 07 '24 10:09 zhangs-a-n

Same, was using pycharm and can not access folders under:\mnt
Tried anything I can think of. Comprehensive Troubleshooting Steps Performed: A. Basic Resets

Repeatedly used wsl --shutdown and restarted the PC.

B. Network Stack Repair

Executed netsh winsock reset and netsh int ip reset in an administrator terminal, followed by a mandatory reboot.

C. Known Bug Workarounds

Created a .wslconfig file in %USERPROFILE% with [wsl2] networkingMode=mirrored to specifically address the known deadlock bug reported in GitHub Issue #11222.

Checked the Network Provider Order in the registry for PnPIM priority.

Checked and confirmed that no file compression or encryption is enabled on the WSL package installation folder.

Tested the alternative \wsl$ path, which also failed.

Temporarily disabled the third-party firewall completely to rule it out.

D. System & Hardware Checks

Verified in BIOS/UEFI that hardware virtualization (Intel VT-x / AMD-V) is enabled.

Ran sfc /scannow and DISM /Online /Cleanup-Image /RestoreHealth to find and fix potential Windows system file corruption. No issues were found or fixed that resolved the problem.

E. Full Reinstallation & Isolation Testing

Diagnostic Install: A brand new "Debian" distribution was installed from the Microsoft Store to isolate the problem. This new, clean distro exhibited the exact same access error, confirming the fault lies within the Windows host system, not a specific distribution.

Full Feature Reinstallation: All three related Windows Features (Windows Subsystem for Linux, Virtual Machine Platform, Windows Hypervisor Platform) were disabled, followed by a reboot, then re-enabled, followed by another reboot.

Complete WSL Stack Reinstallation: A final, thorough reinstallation was performed:

Unregistered all distributions (wsl --unregister ...).

Uninstalled all distro apps from Windows Settings.

Disabled all three WSL-related features in the "Windows Features" panel.

Rebooted the PC.

Ran wsl --install in an administrator PowerShell to perform a fresh, default installation of the entire stack and a new Ubuntu 24.04.

Ender-Jones avatar Aug 25 '25 09:08 Ender-Jones

Something else worth checking: In /etc/wsl.conf, under [automount], make sure mountFsTab is not set to false.

ljredux avatar Nov 06 '25 23:11 ljredux