0XC0000020

STATUS_INVALID_FILE_FOR_SECTION (0xC0000020) Fix

This error means Windows can't read the attributes of a file mapped to memory. The fix is straightforward: check and repair the file's permissions or replace the corrupted file.

You're Seeing 0xC0000020 — Let's Fix It

This error's a pain because it doesn't tell you which file is bad. You'll see it when launching a program, opening a document, or even booting up. The message says the file's attributes can't be read — that means Windows tried to map that file into memory and couldn't figure out what type it is or how to handle it.

The fix is almost always one of three things: a corrupted system file, a bad driver file, or a permissions issue. Let's start with the most common cause — system file corruption — and work through the rest.

First Fix: Run System File Checker (SFC)

  1. Open Command Prompt as administrator. Click Start, type cmd, right-click Command Prompt, and choose "Run as administrator."
  2. In the black window, type this and press Enter:
    sfc /scannow
  3. Wait. This takes 10–20 minutes. You'll see a progress bar going from 0 to 100%. After it finishes, you'll get one of three messages:
    • "Windows Resource Protection did not find any integrity violations." — Good, no system files are corrupt. Move to the next fix.
    • "Windows Resource Protection found corrupt files and successfully repaired them." — Great, you're done. Restart your PC and try again.
    • "Windows Resource Protection found corrupt files but was unable to fix some of them." — Run DISM next.

Second Fix: Run DISM (Deployment Image Servicing and Management)

DISM fixes the system image that SFC needs to check. Run this before SFC if you got the "unable to fix" message above.

  1. Open Command Prompt as administrator again (same steps as above).
  2. Type this and press Enter:
    DISM /Online /Cleanup-Image /RestoreHealth
  3. This takes 20–30 minutes. Don't close the window. You'll see a progress bar. After it finishes, restart your PC.
  4. Run sfc /scannow one more time. This time it should fix any leftover problems.

Third Fix: Check File Permissions

If the error points to a specific file — like a DLL or EXE in the error message — the file might be locked down by permissions. Here's how to fix that.

  1. Right-click the file and choose Properties.
  2. Go to the Security tab.
  3. Click Advanced at the bottom.
  4. At the top, next to "Owner," click Change.
  5. Type Everyone in the box, click Check Names (it will underline it), then click OK.
  6. Check the box "Replace owner on subcontainers and objects" — this is for folders.
  7. Click Apply, then OK.
  8. Go back to the Security tab, click Edit, then Add.
  9. Type Everyone again, click OK.
  10. Check the "Full control" box under Allow. Click OK twice.

After doing this, you should be able to open the file without the error. If it still fails, the file itself is damaged — you'll need to replace it from a backup or reinstall the program.

Why This Happens

Windows uses memory-mapped files to speed up access to data — it's like taking a shortcut. The OS looks at the file's attributes (size, type, timestamps) and maps it into virtual memory so it can be read instantly. When those attributes are corrupted or missing, Windows throws 0xC0000020 because it can't figure out how to map the file.

Common triggers: a sudden power loss during a file write, a failing hard drive, malware that scrambles file headers, or a botched Windows update. I've also seen it from third-party antivirus software that locks files mid-operation.

Less Common Variations

Driver Files (.sys) Triggering the Error

Sometimes the bad file is a driver. You might see this error during driver installation or when a device is plugged in. The fix: update the driver from the manufacturer's site. Don't use Windows Update for this — go directly to the hardware maker's download page.

Game Files — Especially on Steam or Xbox App

Gamers see this error more than anyone. It often hits when a game file is corrupted mid-download. Solution: verify the game files. In Steam, right-click the game in your library, go to Properties > Local Files > Verify integrity of game files. For Xbox/Microsoft Store, use the Repair option in Settings > Apps > find the game > Advanced Options > Repair.

Pagefile.sys Corruption

Rare, but possible. If the error appears during boot or heavy multitasking, the page file might be damaged. Fix:
1. Open System Properties (right-click This PC > Properties > Advanced system settings).
2. Under Performance, click Settings.
3. Go to the Advanced tab, under Virtual memory, click Change.
4. Uncheck "Automatically manage paging file size for all drives."
5. Select your C: drive, choose "No paging file," click Set.
6. Restart, then go back and set it to "System managed size" again.

How to Prevent This Going Forward

  • Keep your system files clean. Run SFC and DISM once a month. I do it on the first of every month — takes 30 minutes total.
  • Use a good power supply. Surges and outages corrupt files. A UPS backup will save you from this headache.
  • Check your hard drive health. Run chkdsk C: /f every few months. If you hear clicking or the drive's slow, replace it before files go bad.
  • Don't use registry cleaner tools. They often break file associations, which can cause this error indirectly. Windows has its own built-in tools — use them.
Related Errors in Windows Errors
0XC0220017 0XC0220017: Can't Delete Built-In Firewall Object — Fix 0X4000000C Fix IOCTL 0x4000000C Error on Windows 10/11 0XC00D2788 Fix NS_E_DRM_INVALID_MIGRATION_IMAGE (0xC00D2788) in 3 Steps 0x8007264 Windows Time Service Not Syncing – Quick Fix for Error 0x8007264

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.