Skip to content
PCFixWorkbench

Storage · Windows 11

Fix a USB drive that shows as read-only or write-protected

Written November 28, 2026

A USB drive that refuses every write is usually carrying a read-only attribute, a physical lock switch, or a file system error — and sometimes it is failing. Copy anything you need off it first, then clear the attribute and check the file system.

What you need

Read the problem before you touch it

  1. Separate the three causes. 'Write-protected' and 'read-only' messages come from three places: a physical lock switch on the drive or its adapter, a read-only attribute set on the disk in Windows, or file system damage that makes Windows mount the drive read-only to protect it. Each has a different fix, in the order below.
  2. Check whether reading still works. If you can open and copy files off the drive, do that now, in full. If the drive also fails to read, or disappears and reappears, treat it as failing hardware and put recovery of the files ahead of any repair.
  3. Look at the drive in Disk Management. Right-click Start and choose Disk Management. Find the USB drive by its size, note its disk number, and read its status. A drive shown as Read-Only there confirms the attribute branch; a drive shown with a RAW or missing file system points at damage instead.

The simple fixes, in order

  1. Check the physical lock switch. Many SD cards, and some USB sticks and card adapters, carry a small sliding switch on the side. Slide it to the unlocked position, reinsert the drive, and try copying a small file onto it.
  2. Try another port and another PC. Plug the drive directly into a different USB port, not through a hub. If it writes normally in another PC, the fault sits with the first PC's port or policy, not the drive.
  3. Check the file system for errors. In File Explorer, right-click the drive, choose Properties > Tools, and run Check under Error checking. Windows mounting a damaged file system as read-only is a deliberate protection, and repairing the errors often hands write access straight back.
  4. Scan the drive. Right-click the drive in File Explorer and run your security software's scan on it. A detected threat can leave a drive locked down until it is cleaned.

The advanced route

  1. Clear the read-only attribute with diskpart. Open Windows Terminal as administrator and run diskpart. At its prompt, run list disk, then select disk N using the number you noted for the USB drive — check the size column twice before pressing Enter. Then run attributes disk clear readonly and exit. Microsoft documents the command in diskpart and the attribute itself in attributes disk.
  2. Test a write immediately. Copy one small file onto the drive, delete it, and copy it again. A drive that accepts writes now is fixed; a drive that reports read-only again straight away is re-applying the attribute, which points at the drive itself.
  3. Format only with the files already safe. If the attribute clears but the file system still misbehaves, format the drive from Disk Management — this erases everything on it, which is why the copy-off step came first. Choose exFAT for a drive used across Windows and other devices, or NTFS for a Windows-only drive.

End state

When it goes wrong

Related fixes

Sources