Troubleshooting Corrupted File Yields Error: File Not Accessed (System) when Accessing WSL App
If you're encountering the error message "File Not Accessed (System)" when trying to access a WSL (Windows Subsystem for Linux) app due to a corrupted file, you're not alone. This is a well-known error, and while there are common solutions, they may not always work. In this article, we'll cover some troubleshooting steps that you can take to resolve this issue. But first, let's discuss the context and key concepts related to this error.
What is WSL?
WSL is a compatibility layer for running Linux binary executables natively on Windows 10 and Windows Server 2019. It allows developers to use their favorite Linux tools, such as bash, ssh, git, apt, and more, directly on Windows, without the need for a virtual machine.
Why do files become corrupted?
Files can become corrupted due to various reasons, such as hardware failures, software bugs, viruses, or malware. When a file is corrupted, it may become inaccessible or unreadable, leading to errors when trying to open or use it.
Common solutions for file corruption
Some common solutions for file corruption include running a file system check, using a disk cleanup tool, or recovering the file from a backup. However, these solutions may not always work, especially if the corruption is caused by a hardware failure or a sophisticated virus or malware.
Troubleshooting Steps
If the common solutions for file corruption don't work, you can try the following troubleshooting steps:
-
Check the disk for errors: You can use the Windows Disk Error Checking tool to scan your disk for errors and repair them. To do this, follow these steps:
- Press the Windows key + X and select
Command Prompt (Admin)orPowerShell (Admin). - Type
chkdsk /fand press Enter. If the disk is in use, you'll be prompted to schedule the disk check for the next reboot. Press Y to confirm. - Restart your computer and allow the disk check to complete.
- Press the Windows key + X and select
-
Repair the WSL installation: If the file corruption is related to the WSL installation, you can try repairing it using the following steps:
- Press the Windows key + X and select
Windows PowerShell (Admin). - Type
wsl --repairand press Enter. This command will repair the WSL installation and reset the distribution to its default state.
- Press the Windows key + X and select
-
Reinstall the WSL distribution: If repairing the WSL installation doesn't work, you can try reinstalling the distribution using the following steps:
- Press the Windows key + X and select
Apps & features. - Search for the WSL distribution that you want to uninstall and click
Uninstall. - Open the Microsoft Store and search for the WSL distribution that you want to install. Click
Installto download and install it.
- Press the Windows key + X and select
-
Run a virus or malware scan: If the file corruption is caused by a virus or malware, you can use a reputable antivirus or antimalware tool to scan your system and remove any threats. Some popular options include Windows Defender, Norton, McAfee, and Malwarebytes.
In this article, we discussed the well-known error "File Not Accessed (System)" when trying to access a WSL app due to a corrupted file. We covered the context and key concepts related to this error, as well as some troubleshooting steps that you can take to resolve it. These steps include checking the disk for errors, repairing the WSL installation, reinstalling the WSL distribution, and running a virus or malware scan. By following these steps, you should be able to troubleshoot the corrupted file and access your WSL app again.