Microsoft Windows Error Code 0xC000005A: How to Fix It

Medium 15-30 minutes Medium Severity Verified June 2026
Error Code
0xC000005A
Brand
Microsoft Windows
Product Type
operating_system
Severity
Medium
DIY Difficulty
Medium
Estimated Fix Time
15-30 minutes
Error code 0xC000005A, also known as STATUS_MEDIA_WRITE_PROTECTED, indicates that the system is trying to write to a storage device (like a USB drive, SD card, or internal hard drive) that is set to read-only. This typically happens due to a physical write-protect switch, disk properties, or corrupted file system. The following steps will help you remove the write protection and restore access to your data.
Ad

Tools You'll Need

How to Fix Error Code 0xC000005A

  1. Check Physical Write-Protect Switch

    Do not force the switch if it is stuck; gentle pressure only.
  2. Run DiskPart to Clear Read-Only Attribute

    Be careful to select the correct disk to avoid data loss on other drives.
  3. Check Disk Properties in Windows

  4. Modify Registry to Disable Write Protection

    Back up your registry before making changes. Incorrect modifications can harm your system.
  5. Scan for File System Errors

    Do not interrupt the scan as it may cause data loss.
Ad

When to Call a Professional

If the error persists after trying all steps, the storage device may be physically failing or the drive controller is damaged. In such cases, data recovery services should be considered if data is critical, or replace the hardware.

Frequently Asked Questions

What does error code 0xC000005A mean?
It means the media (USB, SD card, or hard drive) is write-protected, preventing any changes to the data. This can be due to a physical switch, disk attributes, or system policies.
Can error 0xC000005A damage my files?
No, the error itself does not damage files; it only prevents writing. However, underlying issues like file system corruption can cause data loss if not resolved.
How do I remove write protection from a USB drive?
First, check the physical switch. If that's not the issue, use DiskPart (attributes disk clear readonly) or modify the registry key StorageDevicePolicies.
Why does my SD card show write-protected without a switch?
Some SD cards have no physical switch; the write protection can be due to file system errors, a corrupted firmware, or the card being locked by a device. Try formatting the card (after backing up data) or using DiskPart.
Is this error common on Windows 10/11?
Yes, it can occur on any Windows version, usually due to a hardware switch or software write protection settings.