54 - How to Fix Write-Protected Read-Only Drives and SD Cards
Fig. 1 Tab shown in unlocked position (enabled for writes)
If you have a write-protected SD card, check that the write-protect (LOCK) switch on the side of the card has not been accidentally moved to the WP (Lock) position (R/W=slide tab nearest to connectors as shown)! If you are using a card reader or caddy, check that it is not moving the switch as you insert it into the slot. Also, try a different card reader in case the WP switch is faulty.
Tab is in rd/wr (unlock) position
Fig. 2 Look for a WP (padlock icon) switch somewhere on the drive. The Netac U335 USB 3.0 Flash drive has a write-protect switch.
Some USB flash drives also have write-protect switches (sometimes hidden in the end of the drive and they are very small!) and so do the Zalman VE200/300/400 ISO emulator HDD caddies.
Some people have had success running chkdsk from an Administrator Command prompt, try a command like:
chkdsk /f E:
(where E: is the USB drive)
Some USB Flash Drive (UFD) utilities can write-protect the whole storage area by modifying the firmware. For instance the "UFD Utilities" application can Write Protect or Un-Write-Protect most UFDs that have an SMI controller (such as Lexar USB 2.0 UFDs). You can also make a CD/DVD-ROM partition on the drive using this utility (which will be write-protected).
WindowsToGo on a USB drive?
If you have used a USB disk run the Windows 8 to Go! Operating System or perhaps a Vista/Win7 OS and now you cannot access it under Windows Vista or 7 even with RMPrepUSB, or even format it under Windows, it may be because the disk has been marked as Read-Only. You may be able to use it in other PCs or notebooks (tip: try another system) but not your PC. Another test would be to try it on another Operating System (e.g. linux or your TV or media centre, if you have one).
If you are getting 'Cannot write to MBR' errors or Write-protect errors, run diskmgmt.msc, right-click on the USB drive volume coloured bar and choose Delete Volume.
Then try unplugging the USB drive and re-connecting it.
I had just such a USB hard disk which had been formatted as NTFS and used as a Windows 8 ToGo! boot disk. I could not copy any files to it or format it under Windows 7 or wipe it using RMPrepUSB - every time I tried I got a 'Write-Protect' error.
Right-click and select Delete Volume
Hidden System Volume Information files
Windows 8 and Windows 10 may be using a sneaky hidden file, e.g. \System Volume Information\WPSettings.dat.
WP = Windows Phone !!!
See here for a way to delete the whole folder in case it is causing problems.
To clear this I use RMPrepUSB - RMPrepUSB v2.1.655 and later now will run this for you on the selected drive. Use the Drive - Clear ReadOnly Status option in the drop-down menu (see below). This is not supported in Windows XP.
If you don't want the contents of the drive (you will lose all data), you can use the RMPrepUSB - Clean button:
1. Select the drive in RMPrepUSB
2. Click on the Clean button (you may get an error)
3. Unplug the USB drive
4. Re-connect the USB drive
5. Repeat the Clean - this time is should complete successfully
Use Windows Diskpart to manually remove write-protection
If you prefer the hard way, you can use Windows 7 Diskpart as follows:
WARNING: DO NOT WIPE THE WRONG DRIVE!
1. Start Menu - All Programs - Accessories - Command Prompt - right-click - Run as Administrator...
2. When the command console opens, type DISKPART
3. List the drives by typing LIS DIS
4. Select the USB drive by typing SEL DIS 1 (if disk 1 is your USB drive)
5. Inspect the details for that disk by typing DET DIS (usually only the first 3 letters of a word are needed for diskpart instead of 'Detail Disk' = 'DET DIS')
Check if the disk is marked as Read-only - e.g.
DISKPART> det dis
TOSHIBA MK2559GSXP USB Device
Disk ID: EF78DCD3
Type : USB
Status : Online
Path : 0
Target : 0
LUN ID : 0
Location Path : UNAVAILABLE
Current Read-only State : Yes
Read-only : Yes < Yes = marked as r/o by OS (not physically write-protected), No = it is physically write-protected (if Current Read-only State = Yes)
Volume 5 H RMPARTUSB NTFS Partition 232 GB Healthy
Note: It is also possible to mark a volume as readonly, so try LIS VOL and SEL VOL F: (where F: is your USB drive letter) and then DET VOL to list the attributes.
If it says 'Read-only: NO'in Diskpart but shows as 'Read-Only' in Disk Manager, then the disk is probably physically write-protected (or perhaps write-protected by the firmware in the device's internal controller). In this case the following procedure will have little affect! You should look for a write-protect (aka 'Lock' or maybe a padlock symbol) switch on the device. If you are sure that none exists, consider re-programming the controller firmware.
6. Type ATT DIS CLEAR READONLY to clear the ReadOnly attribute and then type DET DIS again to check it has been cleared.
This also changes the Windows Registry (on the system you are using) to set the device to a Read-Write status. The command will thus appear to work even if the USB disk is physically write-protected!
(optional - if the drive still is Readonly try this) type CLEAN to erase all contents from the drive (make sure you have selected the correct drive!!!!!)
Note: To clear a Volume readonly attribute, use ATT VOL CLEAR READONLY
7. Finally type EXIT to quit Diskpart
Some diskpart commands can be shortened to just the first 3 letters...
8. Now unplug the USB disk and re-insert it into the USB port.
It is possible to change file and folder permissions on an NTFS drive to prevent Windows from having write access to it.
NTFS Drive Protection is small Windows executable that can change the NTFS permissions on an NTFS volume. You can use this to write-protect a whole USB drive, but it also allows for some (user-specified) folders on the drive to be read/write whilst all others are read-only. You can keep the utility on your NTFS drive and run it from a Windows system before you connect the USB drive to an infected Windows system.
If the volume has been protected in this way, you can use this tool to unprotect it (you may have to protect it first and then unprotect to remove all protection).