The media is write protected / The disk is write-protected (USB or SD card)
Windows refuses to write to the drive because a hardware lock, a read-only attribute, a policy, or a failing flash device is in effect.
Seen on:
Windows
Meaning
SD adapters have a physical lock switch. Disks can be marked read-only by diskpart, by a registry/USB policy (StorageDevicePolicies) or by BitLocker To Go/endpoint security. Worn-out flash drives often switch to permanent read-only mode.
Common causes
- Physical lock switch on SD card/adapter
- Read-only attribute set (diskpart)
- WriteProtect policy in registry/GPO
- Failing USB flash drive in read-only mode
⚡ Quick fix
- Check the lock switch
- diskpart attributes disk clear readonly
- Check the StorageDevicePolicies WriteProtect value
Detailed fix by platform
Windows
- powershell
diskpart list disk select disk 2 attributes disk clear readonly exit reg query HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
How to diagnose
- Switch — Lock position
- Attributes — diskpart attributes disk
- Policy — WriteProtect value / endpoint security
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Windows
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026