3

I installed Ubuntu 20.04 in WSL2 before updating from Windows 10 to 11 beta, and in Windows 10 it always worked fine.

After the update I can still see the installed distribution like this:

PS C:\> wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
PS C:\>

But I can't start it anymore:

PS C:\> wsl
Access is denied.
PS C:\>

This happens even when I run PowerShell as Administrator, I get the same Access is denied as non-privileged and as Administrator user.

Does somebody have an idea how to solve this?

replay
  • 524
  • 3
  • 8
  • 3
    You should report this issue through the Feedback Hub. The Linux kernel likely needs to be updated. – Ramhound Jul 06 '21 at 16:26
  • @Ramhound thx, done – replay Jul 06 '21 at 16:27
  • However, this is a long standing issue, so I would attempt to shutdown the WSL instance and perform a system reboot. [If that still does not work, run "WSL" within a Command Prompt with elevated permissions.](https://askubuntu.com/questions/1240409/access-is-denied-while-launching-ubuntu-wsl) – Ramhound Jul 06 '21 at 16:32
  • You might also remove / uninstall WSL , restart, and reinstall WSL . I had to do that. – John Jul 06 '21 at 16:38
  • @john did you have the same problem and then it worked after doing so? I prefer to not do that because then i'll have to setup everything inside my Ubuntu from scratch again, but if there's no other way then I can do it – replay Jul 06 '21 at 16:40
  • I had an issue with WSL and that is how I solved it . I am not yet a big fan of WSL. – John Jul 06 '21 at 17:00
  • Under Windows 10, at least, an "Access Denied" when running `wsl.exe` is often caused by some form of encryption or compression. Check that neither `%USERPROFILE%\AppData\Local\Packages{distribution_folder}` nor `%TEMP%` is encrypted or compressed. – NotTheDr01ds Jul 06 '21 at 17:33
  • Also, if you do have to uninstall/reinstall, make sure to copy out the `ext4.vhdx` file from your installation. It can be restored afterwards to recover the filesystem. Also check to see if a `wsl --export` will still work -- If so, use it to create a backup as well that can be `wsl --import`ed afterwards. – NotTheDr01ds Jul 06 '21 at 17:35
  • See if a WSL update is available. My Windows 1 Insider machine just updated WSL . – John Jul 06 '21 at 22:12
  • I'm really sorry, but in the end the issue was that BitDefender has blocked some executables that are used by the WSL2 (without showing me a notification). I'm guessing it did that because it didn't have the fingerprints of those new Windows 11 binaries in its list of trusted fingerprints yet. Thanks a lot for all the help and suggestions. – replay Jul 07 '21 at 18:42

1 Answers1

1

I found the problem myself. The issue was that BitDefender has blocked some executables that are used by the WSL2 (without showing me a notification). I'm guessing it did that because it didn't have the fingerprints of those new Windows 11 binaries in its list of trusted fingerprints yet. Once BitDefender stopped blocking these binaries everything worked.

replay
  • 524
  • 3
  • 8