Skip to content
WindowsIntermediate

How to Fix “The Disk Is Write-Protected” Error on a USB Drive in Windows

Quick Answer If Windows displays “The disk is write-protected. Remove the write-protection or use another disk” when copying a file to a USB drive, first che...

BI
Bison Technical Team Enterprise IT specialists
Updated 27 Oct 2026 8 min read 1 total views
Structured technical guidanceSafety notes included where requiredSources listed below

Quick Answer

If Windows displays “The disk is write-protected. Remove the write-protection or use another disk” when copying a file to a USB drive, first check its physical lock switch, then inspect its disk and volume attributes using DiskPart. If the attributes are already disabled but the drive remains write-protected, investigate Windows security policies and test the USB on another computer.

If DiskPart displays Current Read-only State: Yes and Read-only: No, Windows currently reports the disk as read-only even though its normal DiskPart read-only attribute is disabled. This does not, by itself, prove that the USB hardware has failed.

Advertisement

What Does the USB Write-Protected Error Mean?

Write protection prevents Windows from modifying a storage device. You might still be able to open files on the USB drive but be unable to copy new files, edit existing documents, rename files, or delete data.

Possible causes include a physical lock switch, a disk or volume attribute, an organizational security policy, or a USB drive that has entered a hardware-enforced read-only state.

Common Causes

  • Physical lock switch: Some USB storage devices and memory cards have a switch that prevents writing.
  • Disk read-only attribute: DiskPart may have the disk's read-only attribute enabled.
  • Volume read-only attribute: The selected volume may have a separate read-only attribute.
  • Windows security policy: A local or organizational policy may deny write access to removable disks.
  • Device or controller fault: The USB drive may be unable to accept writes because of an internal hardware or firmware problem.
  • File-system or device problems: Storage errors may interfere with normal write operations and require further diagnosis.

Before You Begin

  • If the USB contains important files, copy any accessible data to another drive before attempting repairs.
  • Connect the USB directly to a working USB port, avoiding an unnecessary hub or adapter.
  • Check whether the problem affects one USB drive or several drives on the same computer.
  • Do not format the drive or delete its partitions while diagnosing write protection.
  • Use an administrator account when running DiskPart or changing system-wide settings.
Warning: DiskPart commands operate on the selected disk or volume. Selecting the wrong disk can affect your computer's internal storage. Confirm the disk number, capacity, and volume letter before running any command. Do not run clean, format, or partition-deletion commands as an initial fix.

Method 1: Check the Physical Lock Switch

  1. Safely disconnect the USB drive.
  2. Inspect the device for a small Lock/Unlock switch. If it has one, move it to the unlocked position.
  3. Reconnect the drive and try copying a small test file.

If the device has no physical lock switch or the error persists, continue to the next method.

Method 2: Clear the Disk Read-Only Attribute Using DiskPart

DiskPart is a built-in Windows command-line utility for managing disks and volumes. This procedure checks the disk's attributes and attempts to clear its read-only attribute without formatting the drive.

Step 1: Open DiskPart as Administrator

  1. Right-click Start and open Terminal (Admin) or Command Prompt (Admin).
  2. Enter the following command:
diskpart

Step 2: Identify the USB Disk

list disk

Compare the listed disk capacities with the USB drive's capacity. Select the USB only after identifying it correctly.

select disk N

Replace N with the actual disk number. For example, use select disk 2 only if Disk 2 has been positively identified as the USB drive.

Step 3: Inspect and Clear the Attribute

attributes disk

Review these two properties:

  • Current Read-only State indicates whether Windows currently reports the disk as read-only.
  • Read-only indicates the disk's normal DiskPart read-only attribute.

If Read-only is Yes, run:

attributes disk clear readonly

If it already says No, you may still run the clear command as a diagnostic attempt. Then inspect the attributes again:

attributes disk

Step 4: Interpret the Result

Result Next action
Both properties show No Try copying a test file. If it fails, continue with the volume and policy checks.
Current Read-only State is Yes, but Read-only is No Check the volume attributes, Windows policies, and USB behavior on another computer.
DiskPart reports an error Record the exact error message and investigate that specific failure.

See Microsoft's attributes disk reference for command syntax and behavior.

Method 3: Check the USB Volume's Read-Only Attribute

A volume is a logical storage area associated with a drive letter. Checking its attributes is useful when clearing the disk attribute does not resolve the problem.

Step 1: Find the USB Volume

Inside DiskPart, run:

list volume

Identify the volume by its drive letter, file system, and capacity. In the example discussed here, the USB is Volume 5, drive F:, formatted as FAT32, with a displayed capacity of approximately 7,633 MB. These identifiers may differ on other computers.

Step 2: Inspect the Volume

select volume 5
attributes volume

Use Volume 5 only if it still corresponds to your USB drive. Check whether the volume's read-only attribute is enabled.

Step 3: Clear the Volume Attribute if Necessary

If the volume reports Read-only: Yes, run:

attributes volume clear readonly

Then verify the attributes again:

attributes volume

If the attribute was already disabled, continue with the remaining diagnostics rather than assuming that repeating the command will solve the problem.

See Microsoft's attributes volume documentation for details.

Method 4: Check Whether Windows Is Blocking USB Writes

If the disk and volume attributes are not responsible, Windows may be enforcing a removable-storage security policy. This is particularly relevant on computers managed by an organization or configured with security restrictions.

Check Group Policy on Windows Pro, Enterprise, or Education

  1. Press Windows + R.
  2. Enter gpedit.msc and press Enter, if the Local Group Policy Editor is available.
  3. Navigate to User Configuration > Administrative Templates > System > Removable Storage Access.
  4. Look for Removable Disks: Deny write access.
  5. If the policy is enabled, check whether it is intentionally configured. On a personal computer, change it only if you have confirmed that the restriction is unintended and you are authorized to modify it.

A computer-level policy, device-management setting, or security product may also be responsible. A user-level policy is not the only possible source.

On a managed computer, contact the administrator rather than overriding organizational storage restrictions. See Microsoft's Storage Policy CSP documentation.

Method 5: Test the USB on Another Computer

Testing the drive on a second computer helps distinguish a computer-specific restriction from a problem with the USB device.

  1. Safely eject the USB drive from the original computer.
  2. Connect it to another trusted computer.
  3. Try copying a small, nonessential test file to the drive.
  4. Observe whether the same write-protection error occurs.
Test result What it suggests
The USB accepts files on another computer The original computer's policies, configuration, port, or software may be responsible.
The USB remains write-protected on multiple computers A device-level lock or hardware/controller problem becomes more likely.
The USB disconnects or reports additional errors Investigate the port, connection, device condition, and possible hardware failure.

These outcomes are diagnostic clues rather than definitive proof of a particular cause.

Method 6: Check the USB for Hardware Failure

Some flash drives enter a read-only state when their internal controller can no longer safely perform writes. If the drive remains read-only across multiple computers after the normal attributes have been checked, software commands may not be able to restore writing.

  • Copy any accessible files to another storage device as soon as possible.
  • Avoid repeated write attempts if the drive is behaving erratically.
  • Do not rely on formatting or partition-repair utilities to overcome hardware-enforced write protection.
  • If the files are valuable and cannot be copied, consider professional data-recovery assistance before further repair attempts.

Verify That the Problem Is Resolved

After applying a relevant fix, open the USB drive in File Explorer and copy a small test file to it. If necessary, rename or delete that test file to confirm that writing works normally. Do not use an important document as the test file.

If the copy operation succeeds, the write restriction may have been resolved. If Windows still reports that the disk is write-protected, record the latest DiskPart output and the results of the second-computer test before proceeding.

Frequently Asked Questions

Why does Current Read-only State show Yes when Read-only shows No?

The two properties report different aspects of the disk's state. The normal DiskPart read-only attribute is disabled, but Windows still reports that the disk is currently read-only. Possible explanations include device-level restrictions or other system restrictions. This output alone does not identify the exact cause.

Will clearing the DiskPart read-only attribute delete my files?

The attributes disk clear readonly command clears the selected disk's read-only attribute; it is not a formatting or data-deletion command. Nevertheless, always verify the selected disk before executing DiskPart commands.

Will formatting fix a write-protected USB drive?

Not necessarily. Formatting erases data and may fail if the device or Windows continues to enforce write protection. Back up important files and identify the cause before considering formatting.

Why can I open files on my USB but cannot copy new files to it?

Read access and write access are different operations. A device may allow existing files to be read while preventing changes because of a lock switch, a read-only state, a security policy, or a device fault.

What should I do if the USB remains write-protected on every computer?

Check for a physical lock, verify the disk and volume attributes, and preserve accessible data. If the drive remains read-only after these checks, an internal controller or hardware problem may be responsible. Replacement or professional data recovery may be more appropriate than further software repairs.

Sources

YOUR FEEDBACK

Was this guide useful?

Your answer helps us keep BISONKB accurate and practical.

Links are permitted only to published BISONKB articles.
THE BISON BRIEF

Practical IT knowledge, once a week.

New troubleshooting guides, scripts and infrastructure notes. No noise.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.