Quick Answer
Check the physical write-protect switch on the side of your SD card or USB drive. If it's there, slide it to the unlocked position. No switch? Try diskpart's 'attributes disk clear readonly' command, or check your drive's partition for corruption.
Why This Happens
Error 0xC00000A2 shows up when you try to copy files to a drive or format it, but Windows says no. It's a write-protect error. I know it's annoying—especially when you're in a hurry. I've seen this on SD cards from cameras, USB flash drives, and sometimes external hard drives after a bad eject. The trigger is usually one of three things: a physical lock switch (very common on SD cards), a corrupted partition that Windows marks read-only, or a drive with bad sectors that protects itself. Let's fix it.
Step-by-Step Fixes
Step 1: Check the Physical Lock Switch
Look at your SD card or USB drive. On the side, there's a tiny plastic switch. If it's pushed down toward the edge (locked), slide it back up. This is the #1 cause for this error. I've seen people spend an hour on software fixes when the switch was just flicked by accident. If you have a microSD card in an adapter, check the adapter's switch, not the card.
Step 2: Use diskpart to Clear Read-Only Attribute
If there's no switch, the drive might have a software write protection. Open Command Prompt as Administrator. Type these commands one by one:
diskpart
list disk
select disk X (replace X with your disk number, be careful)
attributes disk clear readonly
exitThis removes the read-only flag. I've used this on dozens of USB drives. It works most of the time. If it fails, move to Step 3.
Step 3: Check Disk for Errors
Sometimes the drive has bad sectors and Windows sets it read-only to protect data. Run chkdsk:
chkdsk X: /f (replace X with your drive letter)This fixes file system errors. On a Windows 10 or 11 machine, it might take 5-10 minutes for a 32GB drive. If chkdsk finds a lot of bad sectors, the drive may be dying. Back up your data now.
Step 4: Edit the Registry (Advanced Users Only)
If the above fails, the issue might be a registry entry that locks all removable drives. Open Registry Editor (regedit) and go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePoliciesFind the DWORD called WriteProtect. Set its value to 0. If the folder or key doesn't exist, you don't need it—skip this step. This setting is usually put there by IT admins. I've seen it on work computers.
Alternative Fixes
If none of that works, try these depending on your drive type:
- SD cards: Format the card using the SD Card Formatter tool from the SD Association. It resets the card's internal controller.
- USB flash drives: Use the manufacturer's recovery tool (like Kingston's or SanDisk's). Some have a hidden firmware lock.
- External hard drives: If it's a Western Digital or Seagate, check their disk utilities. Sometimes they have a 'secure erase' option that fixes this.
Prevention Tips
To avoid seeing this error again: Always safely eject your drives before unplugging. A sudden power loss can flip the write-protect flag. Also, don't force a USB drive into a tight port—physical damage to the connector can trigger this. And for SD cards, keep the switch in the unlocked position when not using the camera. If you store them in a case, the switch can slide by accident.
One last thing: If your drive is over 3 years old and you get this error after a drop or water spill, it's likely hardware failure. Don't waste time—clone the data and replace the drive. That tripped me up the first time I tried to fix a genuinely dead drive.