Have you encountered the error message “Disk is write protected” when trying to copy files or format your disk? This can be a frustrating issue for many users in general. So what is the cause of this error and how can you fix it? Today, FPT Shop will help you find out.
What is the Write Protect error and what causes it?
The Write Protection feature is often used for disks to prevent any new data from being written to the disk. The Write Protection error occurs when you try to copy or modify the content of a write-protected storage device. The error can be caused by the following reasons.
- The owner intentionally enables the Read-only feature of the device to secure its content.
- The error may be caused by malware (specifically ransomware) or accidentally by encryption tools.
But whatever the reason may be, you should not immediately format the storage device. Because the Write Protection feature can be fixed in many different ways.
How to fix the Write Protect error
1. Use the lock switch of the storage device
Some storage devices have a lock switch that can turn on or off the write protection feature. So the first thing you should do when encountering the error indicating that your disk is write-protected is to check the physical disk to see if there is a lock switch.
If there is, simply turn it on and plug your disk back into the appropriate port. This will solve the write protection issue. If the problem still persists or your disk does not have a physical write protection lock, move on to the next method.
2. Disable the read-only feature using DiskPart
You can use the Windows utility DiskPart to unlock your storage device. This method requires the use of CMD commands and utilizes DiskPart to remove the write protection feature from your USB drive, but the process applies to all types of write-protected storage devices.
To start, plug in the storage device you want to remove the write protection feature from, make sure your computer recognizes the connected storage device through File Explorer. As shown in the example below, the write-protected flash drive is named “USB Drive (G:)” and is plugged into the computer.
If your computer has multiple storage partitions, it is advisable to record the external storage memory designation for easy identification in the future. In the example below, the flash drive memory is at least 14GB.
After confirming that the storage device has been recognized by the computer and noting the designation of the device, you need to run the Diskpart tool. This is a built-in Windows program, so you don’t need to install it and you just need to activate it through the Run command.
Step 1: Open the Run tool by pressing the Windows + R key combination. When the Windows Run box appears, enter the command diskpart into the empty Open field and press Enter.
When you run DiskPart, you will see the Diskpart utility window as shown below.
Step 2: In the displayed command window, enter the command below into the DiskPart utility window and press Enter.
This command will display all available storage devices on the computer. As shown below, you will see that the computer has two connected disks, with Disk 0 being the main hard drive and Disk 1 being the flash drive that was connected to the computer earlier.
Step 3: From the list of disks on the system, find the designated disk. You will need this attribute to choose the correct device for troubleshooting. Still in the command window, enter the following command and press Enter.
In this example, [disk number] is Disk 1, which is the device to be selected. After pressing Enter, the Diskpart utility will inform you that the current disk has been selected.
Step 4: Although you can skip this step when you already know the external storage disk to be troubleshooted, it is advisable to view the attributes of the selected disk to see the overall status of the storage device. In the command window, enter the following command.
Step 5: After entering the command, press Enter to display all the attributes of the selected disk. Note that in the example below, the Read-only attribute is set to Yes.
When the Read-only attribute of the disk is configured as Yes, it means that this attribute does not allow modifications on the device. If your disk is configured this way, then the storage device is write-protected.
Step 6: Your task now is to remove the Read-only attribute of the disk. Clearing this attribute means changing the disk’s status to No, thus disabling the write protection feature. To do this, continue entering the following command in the command window.
Step 7: You will be notified that the attribute has been successfully cleared. Try running the attributes disk command from step 4 again, and you will see that the Read-only attribute will be set to No.
Step 8: When finished, you can exit the Diskpart utility by entering the exit command. Now you can copy files and make changes to your storage device without encountering the Disk is write protected error message.
3. Remove the write protection feature using Registry Editor
For advanced users, the Registry Editor tool is optimal for removing the write protection feature on storage devices.
As always, be cautious when editing the Windows Registry. Modifying, deleting, or creating new keys in the Registry Editor can cause errors if done incorrectly. So be careful and follow the detailed steps as shown in the example below.
Step 1: Connect the storage device you want to remove the write protection feature from to your computer, ensuring that the computer recognizes the device.
Step 2: Launch the Registry Editor by pressing the Windows + R shortcut to display the Run box, then enter regedit into the empty field and press Enter.
Step 3: In the displayed Registry Editor window, navigate to the following path in the left pane.
Step 4: Confirm whether the StorageDevicePolicies folder exists. If the folder already exists, you can skip the creation process and proceed to create the DWORD. If not, you need to manually create this folder by right-clicking on the Control folder in the left pane, choosing New >Key.
After creating the folder or new key, rename it to StorageDevicePolicies.
Step 5: To make the StorageDevicePolicies folder work, you should create a new DWORD and name it WriteProtect. By selecting the StorageDevicePolicies folder in the left pane, then right-clicking in the empty area on the right pane and choosing New > DWORD (32-bit) Value.
Step 6: Rename the newly created DWORD to WriteProtect as shown in the example below.
Step 7: Double-click on the WriteProtect key, in the displayed dialog box, change the value below the Value data field from 1 to 0, then click the OK button to apply. This will allow you to disable the write protection feature of the storage device.
Step 8: Close the Registry Editor window and to complete the process, restart your computer and verify whether the write protection feature has been removed from the storage device or not.
In the worst case scenario, you may have tried all the methods but the write protection issue still persists. In this case, you may want to consider formatting your disk.
- How to fix a full disk error, release disk C on Windows 10
- How to fix Windows cannot format USB error