"The Disk Is Write Protected" on Windows: Clear the Flag Without Losing Data
Windows will let you open the drive, browse every folder, and copy files off it. What it refuses is anything that writes: a new file, a rename, a delete, a save. The wording is the same every time, "The disk is write protected," and it says nothing about why.
That silence matters, because two unrelated situations produce the same seven words. In one, a setting tells Windows not to write, and clearing it takes a minute. In the other, the drive itself has stopped accepting writes — and the commands handed out for the first case are the last thing you want to run on the second.
Quick answer: Run Diskpart as administrator and clear the read-only attribute at the disk level and the volume level. Most guides stop at the first, which is why "that didn't work" is such a common reply. If the flag returns after a reboot, or the drive went read-only on its own, copy the data off instead. A read-only drive still reads, so recovery software such as DiskRescue can scan it without writing to it.
Two minutes of triage before you type anything
Is there a switch? SD cards have a slider on the left edge, and with a microSD in a full-size adapter the lock lives on the adapter rather than on the card. A worn adapter can report itself as locked even with the slider pushed up. A few USB sticks carry one; external enclosures almost never do.
One PC or all of them? Plug the drive into a different computer and try to create a text file. Writable there means the block belongs to the first machine: a policy, a driver, a locked-down port. Read-only everywhere points at the drive, or at a flag stored on it.
Is BitLocker in the picture? Open an administrator PowerShell, run manage-bde -status X: with your drive letter, and read the Lock Status and Protection Status lines it reports. A locked volume does not mount at all. Explorer shows a padlock and asks for the password before it will show you anything, so a drive whose folders you can browse is not a locked one. The BitLocker setting that does produce a readable but unwritable drive is the policy "Deny write access to removable drives not protected by BitLocker," under Computer Configuration → Administrative Templates → Windows Components → BitLocker Drive Encryption → Removable Data Drives. With that enabled, every removable drive that is not encrypted mounts read-only, and an encrypted one mounts normally.
Did it start by itself? An error that appeared after a yanked cable, a power cut, or a copy that died halfway, with nobody touching any settings, puts the drive under suspicion. Skip ahead to the copying section. A drive that flips itself to read-only is reporting a fault rather than obeying an instruction.
Clear the read-only flag at both levels
Diskpart keeps read-only in two independent places. The disk attribute and the volume attribute are separate switches, and clearing one leaves the other in force.
Open Command Prompt or PowerShell as administrator, then:
diskpartlist diskselect disk 2, identifying it by the size column rather than by guessingattributes disk, and read the "Current Read-only State" lineattributes disk clear readonlydetail disk, which lists only the volumes sitting on the disk you just selected, so you can see which number belongs to itselect volume 5, using a number from that list.select volume Epicks the same volume by its drive letter, which is harder to get wrong.attributes volume clear readonlyexit
Eject the drive, reconnect it, and try to create a file on it.
One warning is worth reading twice. attributes disk clear readonly touches no data, but clean sits a line below it in plenty of tutorials on this error, and it wipes the partition table of whatever disk is selected. Check the disk number against the size column before every command.
Watch for two answers that mean stop, not continue. If Diskpart itself replies "the media is write protected" while clearing the attribute, the refusal is coming from the device rather than from Windows. And if the flag clears but comes back after a reboot, something is setting it: a policy, or the hardware.
When Windows is the one refusing
The registry key quoted in most articles on this error is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies. Here is the part those articles leave out: on a normal Windows installation the key does not exist, and its absence is correct. Creating it and setting WriteProtect to 0 accomplishes nothing, because nothing was reading it. It matters only when the key is already there with WriteProtect set to 1, in which case you flip that to 0 and reboot. It governs removable devices only — USB sticks and memory cards — which makes it a weak explanation for a mains-powered external drive that Windows enumerates as a fixed disk.
Group Policy is the likelier cause on a work or school laptop. Run gpedit.msc and follow Computer Configuration → Administrative Templates → System → Removable Storage Access to "Removable Disks: Deny write access." (Home editions have no gpedit.msc. If the command comes back not found, Group Policy is not what is holding your drive, and you can move on to the next cause.) Diskpart cannot override that setting, and disabling it locally holds only until the next domain refresh puts it back, so on a managed machine the real fix is a ticket rather than a registry edit.
If the flag will not clear, copy the data off first
A drive that ignores a clear command is telling you something specific. File system damage does this, and fsutil dirty query X: will tell you whether the volume was left in a dirty state by an unsafe removal. So do failing sectors, once the controller can no longer place writes safely. And an SSD that has used up its spare blocks is designed to fall back to a permanent read-only state rather than corrupt what is already stored. When it does, that is the last chance to read the data out.
Buried in that is an advantage most people waste. While nothing can be written, nothing can be overwritten either, so deleted records stay where they are. That window is better spent copying than running repair tools.
The order that protects the data:
- Have a second drive ready, large enough for a full image of the source rather than only for the files you want back. Never recover onto the source.
- Image before you scan. DiskRescue copies the drive sector by sector to a healthy disk, so every later step runs against a file instead of hardware that may still be deteriorating.
- Scan read-only, both ways. Reading the NTFS records brings files back with their original names and folder paths. Signature carving finds them by their file headers when the metadata is gone — it survives a destroyed file system, but the results arrive with generated names.
- Restore to the second drive, most important files first.
Whether any of it works comes down to one variable: whether those sectors have been overwritten. Nobody can tell you that in advance, and a tool that promises an outcome before scanning is selling a guess.
None of this applies to a drive that is making noise. Clicking, beeping, grinding, repeated spin-downs, or a disappearance from Device Manager are mechanical symptoms, and software does not repair hardware. Every extra hour of power narrows what a professional lab can retrieve. Unplug it and get a quote.
What the free trial settles
A scan answers the question no article can: whether your files are still on your drive.
The DiskRescue trial runs the complete scan rather than a sample, and it reads a write-protected drive without writing to it. You get the full list of what was found, with filenames and folder structure intact wherever the NTFS records survived, and previews you can open before committing to anything.
From there it restores 20 files at no cost. Any size, no account, no social share. Twenty is enough to pull the folder you actually came for and confirm the files open properly instead of arriving as truncated shells, which is what you want to know before paying for any recovery tool.
Frequently asked questions
Will chkdsk /f remove write protection?
No, and it can cost you files. The /f switch means repair, and repair means writing. On a drive that genuinely refuses writes the command fails outright; on one with damaged metadata it can move entries into found.000 folders or discard what it cannot reconcile. Copy the data off first, repair afterward.
Diskpart says the attribute cleared, but the drive is still read-only.
Did you clear it at both levels? Most people run attributes disk clear readonly, see "DiskPart successfully cleared the disk attributes," and stop there while the volume attribute is still set. If you did run both and the state persists, the cause is somewhere Diskpart cannot reach: Group Policy, the BitLocker write-access policy, or the drive's own controller. To tell a setting apart from the hardware, reconnect the drive, run attributes disk again, and read the Current Read-only State line. A flag that is back with nobody having touched a setting points at the drive. Then run the same two commands on a second computer: if the attribute clears there and stays cleared, the first machine is the one refusing writes and the drive itself is fine.
Does formatting remove write protection?
On a drive whose flag you have already cleared, yes, along with the index to every file on it. On a drive that is truly refusing writes, the format fails anyway, because formatting is a write. Neither outcome helps while the data still matters.
The drive went read-only by itself but reads fine. Can I keep using it?
Copy off what you need, then stop trusting it with anything that is not backed up elsewhere. A drive that changes its own state has hit a fault it could not correct, and read-only is often the last stable stage before reads start failing too.
How DiskRescue Compares
On a lifetime license, DiskRescue costs about 1/5 what the big-name recovery suites below charge — paid once and used for life, with no auto-renewal.
| DiskRescue | EaseUS Data Recovery Wizard Pro | Disk Drill PRO | |
|---|---|---|---|
| Price | $29.99 lifetime — launch price | $149.95 lifetime, or $99.95/year | $149 lifetime, or $89/year |
| Billing | One-time, lifetime — no auto-renewal | Monthly / yearly, or lifetime | Yearly, or lifetime |
| What you get free | Preview, then restore 20 free (any size, no share, no sign-up) | Preview, then recover 500 MB (2 GB after a social-media share) | Preview, then recover 100 MB |
| Damaged-disk recovery | ✓ | ✓ | ✓ |
| Deleted-file recovery | ✓ | ✓ | ✓ |
| Secure erase | ✓ | — (not listed) | ✓ |
Prices, features, and free-tier limits checked on each official site (Windows editions) on July 14, 2026 — they may change with sales or updates. The price comparison uses DiskRescue's launch price ($29.99). EaseUS free recovery is 500 MB by default, expanding to 2 GB after a social-media share (kb.easeus.com); Disk Drill's official free limit is 100 MB (cleverfiles.com).