Write protection on an external hard drive blocks any new files from being added, changed, or deleted. This guide walks through the most common causes and fixes, from a physical lock switch to Windows disk attributes, so you can regain full read/write access.
What You’ll Need
- Your external hard drive
- A computer with the drive connected (Windows PC recommended for most steps)
- Administrator access on your computer (to run Command Prompt or edit the registry)
Step-by-Step
- Check for a physical lock switch. Look at the sides, back, or bottom of the drive enclosure. Many external drives (especially ones from Western Digital, Seagate, and LaCie) have a tiny sliding switch labeled “Lock” or showing a padlock icon. Slide it to the unlocked position and reconnect the drive if needed.
- Try a different USB port or cable. A faulty cable or a low-power port can sometimes cause the drive to mount read-only. Use the original cable if possible, plug directly into a rear USB port on a desktop, and avoid USB hubs.
- Check the drive’s file system for errors. Open File Explorer, right-click the drive, select Properties > Tools tab > Check under Error Checking. Let Windows scan and repair any file system issues. This can clear a dirty bit that forces read-only mode.
- Clear the read-only attribute using Diskpart. This is the most reliable method for drives that show “The disk is write protected” in Windows.
- Press Win + X and select Terminal (Admin) or Command Prompt (Admin).
- Type
diskpartand press Enter. - Type
list diskand press Enter. Note the disk number of your external drive (e.g., Disk 1). Be very careful to select the correct one. - Type
select disk 1(replace 1 with your drive’s number) and press Enter. - Type
attributes disk clear readonlyand press Enter. - Type
exitand press Enter. Safely eject and reconnect the drive.
- Remove the read-only attribute from the volume. If the disk-level attribute is cleared but the volume still shows read-only, repeat the Diskpart steps, but after selecting the disk, use
list volume, thenselect volume X(where X is the volume number), thenattributes volume clear readonly. - Edit the Windows registry (if the drive is still write-protected). This fix applies when the protection is set system-wide.
- Press Win + R, type
regedit, and press Enter. - Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies. If theStorageDevicePolicieskey doesn’t exist, right-click Control, select New > Key, and name itStorageDevicePolicies. - Inside that key, look for a DWORD value named
WriteProtect. If it exists, double-click it and set its value to0. If it doesn’t exist, right-click in the right pane, select New > DWORD (32-bit) Value, name itWriteProtect, and leave its value at0. - Close the registry editor and restart your computer.
- Press Win + R, type
- Reformat the drive (last resort). If the drive still won’t allow writes and you have backed up all data, you can reformat it. Right-click the drive in File Explorer, select Format, choose a file system (NTFS for Windows-only, exFAT for cross-platform), and click Start. This erases all data.
Common Mistakes
- Selecting the wrong disk in Diskpart. Running
attributes disk clear readonlyon your system drive can cause boot problems. Always double-check the disk number and size. - Forgetting to check the physical switch. This is the simplest cause and is often overlooked, especially on smaller drives.
- Using a USB hub or extension cable. Power or signal issues from these can make the drive behave as read-only.
- Skipping the volume attribute step. The disk-level attribute is not the same as the volume-level attribute; you may need to clear both.
- Reformatting without backing up. Reformatting permanently deletes all files. Only do this after you’ve tried everything else and have copied your data elsewhere.
Tips
- Always use the “Safely Remove Hardware” option before unplugging the drive to prevent file system corruption that can trigger read-only mode.
- If the drive is formatted as exFAT and you are using it on a Mac, check the drive’s “Ignore ownership on this volume” setting in Finder’s Get Info window, as this can sometimes cause permission issues.
- Keep the drive’s firmware updated if the manufacturer provides a utility for it. Firmware bugs can cause write protection.
- If you are on a Mac, the Disk Utility First Aid tool can repair permissions and the file system, which may clear the read-only flag.
Troubleshooting
Diskpart reports “The disk is write protected” even after clearing attributes. This usually means the physical switch is still on, or the drive’s firmware has locked it. Recheck the switch, try a different computer, and if it persists, the drive may be failing. Check its health with a tool like CrystalDiskInfo (Windows) or smartctl (macOS/Linux).
You get an “Access Denied” error when trying to format. Run the format command from an elevated Command Prompt (right-click > Run as administrator), or use Disk Management (right-click Start > Disk Management) to format the volume from there.
The registry key StorageDevicePolicies does not exist. That’s normal on many systems. Create it manually as described in Step 6. If the WriteProtect value is already 0, the registry is not the cause.
The drive works on another computer but not yours. The issue is likely on your system. Try a different USB port, update your chipset/USB drivers, or check if third-party security software is blocking writes to removable drives.
After clearing attributes, files can be added but not deleted. This often points to a file-level read-only attribute or a permissions issue. Right-click the specific files or folders, select Properties, and uncheck “Read-only” under Attributes. Also check the Security tab to ensure your user account has “Full control” permissions.
The drive is physically damaged. If you hear clicking sounds, the drive doesn’t spin up, or it’s not detected at all, write protection is the least of your problems. Stop using it immediately and consider professional data recovery if the data is valuable.
Frequently Asked Questions
Why did my external hard drive suddenly become write-protected? The most common reasons are the physical lock switch being accidentally moved, a file system error setting the dirty bit, or a Windows policy/registry setting. Less commonly, it can be a sign of failing hardware.
Will clearing the read-only attribute delete my files? No. Both the Diskpart and registry methods only change the drive’s attributes. Your files remain untouched. Only the reformat step erases data.
Can I remove write protection on a Mac? Yes. First check the physical switch. Then use Disk Utility’s First Aid to repair the disk. If the drive is NTFS-formatted, macOS can only read it by default; you would need a third-party NTFS driver to write to it.
Is there a way to remove write protection without reformatting? Yes, in most cases. The Diskpart attribute-clearing method (Step 4) resolves the issue without data loss. Reformatting is only a last resort if the file system is severely corrupted.
What does the “StorageDevicePolicies” registry key do? It’s a Windows-level setting that can force all storage devices to be read-only. Setting WriteProtect to 0 disables that system-wide enforcement.
My drive is new and still write-protected. What should I do? Check the physical switch first, then try a different cable and port. If it persists, the drive may have been formatted with a read-only file system or may be defective. Contact the manufacturer for warranty support.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Good Password: How to Create One
- How to Disable Chkdsk at Windows Startup
- Restore WiFi and Secure Your Netgear Router After Reset
- Fix Error 0x80004005: Top Easy Ways That Work
- How to Cool Down an Overheating Laptop
- Automatic Investing in Volatile Markets: A Guide