The disk is write-protected Windows Origin: Platform & cloud Last updated 15 Oct 2026

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.

Exact message you may see The disk is write-protectedThe media is write protectedRemove the write-protection or use another disk
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

  1. Check the lock switch
  2. diskpart attributes disk clear readonly
  3. Check the StorageDevicePolicies WriteProtect value

Detailed fix by platform

Windows

  1. powershell
    diskpart
      list disk
      select disk 2
      attributes disk clear readonly
      exit
    reg query HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies

How to diagnose

  1. Switch — Lock position
  2. Attributes — diskpart attributes disk
  3. 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:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

0x80004005 — Windows Error 0x80004005 (E_FAIL): Unspecified error (Windows)0x800040050x80070002 — Windows Error 0x80070002: The system cannot find the file specified (Windows)0x800700020x80070005 — Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied (Windows)0x800700050x8007000D — Windows error 0x8007000D (The data is invalid) (Windows)0x8007000D0x80070570 — Error 0x80070570: The file or directory is corrupted and unreadable (Windows)0x80070570Read-only file system — Read-only file system (EROFS) — cannot write to disk (Linux)Read-only file systemwrong fs type, bad option, bad superblock — mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program (Linux)wrong fs type, bad op…The disk …

Explore the map of this error Full error map →

🧠 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.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.