0

This is a well known error, but the common solutions don't seem to work and I'm also seeing something else that I think is new, I'll go through each troubleshooting step because I hope some of them will help identify this problem either for people who know how to solve the issue and for others having the same issue.

When I try to open the Debian app with WSL and whan I try to run wsl commands in Powershell I get this error: The file cannot be accessed by the system.. In my case WSL and Debian were installed on my system from the command line, a few days ago (I had reinstalled them because of an unrelated issue).

One of the common solutions is to look for the WSL app entry in the Windows Installed Apps window, I can't see an entry for WSL there, but I see one for @{MicrosotCorporationll.WindowsSubsystemForLinux_2.1.5.0_x64_8wekyb3d8bbwe?ms-resource://MicrosoftCorporationll.WindowsSubsystemForLinux/Resources/AppName} (this app is listed with 0 bytes of storage usage).

To sum up the possible solution I found so far:

  • try to use the repair option from the Installed Apps Windows settings, I tried doing so for the app I mentioned above and for the Debian app, the repair reached 100% completion but it didn't work
  • try to use dism from an elevated terminal (DISM.exe /Online /Cleanup-image /Scanhealth + DISM.exe /Online /Cleanup-image /Restorehealth), the command ran successfully but it didn't work
  • try to change permissions for the folder C:\Program Files\WindowsApps from the Properties/Security window, I'm not too sure what to change here but I've seen something that seems interesting (listed below)

From the properties of the WindowsApps folder I see that the principal for my user seems to be corrupted, when I double click on it I get a window that shows the following error: This access control entry is corrupt. Delete it and create a new one.

This only applied to the "normal" user principal, not to admin entry for the same user. In fact, I then tried to launch WSL with administrator privileges and I could log into Debian without any issue.

Since this seems a file corruption issue I launched sfc scannow which found a corruption error with C:\WINDOWS\System32\drivers\bthmodem.sys and solved it, but I still see the error message in the WindowsApps folder settings and I still can't use WSL without elevation privileges so I guess that was unrelated to this problem.

How can I repair my wsl installation and/or solve the issue with the security settings for my unprivileged user principal?

7
  • You should install Debian from the Microsoft Store. This might be the simplest solution, after uninstalling the existing Debian.
    – harrymc
    Commented Apr 11 at 9:43
  • 1
    @harrymc That probably won't work either, since it sounds like the distribution itself is corrupt. Uninstalling the app doesn't uninstall the distribution, only the rootfs tarball and distro-launcher. Commented Apr 11 at 15:58
  • 1
    Also, modifying WindowsApps can lead to system corruption, which is why Microsoft makes this folder inaccessible by default. Commented Apr 11 at 16:07
  • 2
    I've provided an answer, but in re-reading your question, I'm not sure it's the right one or not. Are you having an issue with Debian or with WSL. You mention "when I try to run wsl commands in Powershell', but you don't give any details. Does this happen with wsl --version, wsl -l -v, etc.? If so, my answer is certainly not going to help. Commented Apr 11 at 16:08
  • @NotTheDr01ds: My comment was about uninstalling the distro.
    – harrymc
    Commented Apr 11 at 16:29

1 Answer 1

0

I took a hint from this answer and was able to reinstall WSL by downloading the msi executable from the release page, note that meant reinstalling the distros as well.

For reference I took a look to the event viewer and found this error:

AppX Deployment operation failed for package MicrosoftCorporationII.WindowsSubsystemForLinux_2.1.5.0_neutral_~8wekyb3d8bbwe with error 0x80073CF1. The specific error text for this failure is: Unable to install bundle C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_2.1.5.0_neutral~_8wekyb3d8bbwe\AppxMetadata\AppxBundleManifest.xml because it does not have an appropriate application package for x64 architecture.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .