This error occurs when a disk is write-protected, meaning that you can access the driver but cannot make changes to that driver, such as deleting, renaming, and moving files. If you are experiencing this error, you will have to remove the write protection using the diskpart utility, use the registry editor to remove the write protection, and check for disk errors.
Write protection is also known as Read Only. If it is enabled, you will have to disable it if you want to get rid of this error message. Besides, if you have disk errors on your driver, you might encounter this error. Therefore, we recommend using the CHDSK commands listed below to check for the bad sectors.
This error can also be seen on memory cards. If that’s the case, you can easily remove the write protection using a lock on the memory card.
1. Clear Ready Only Attributes
The error often occurs when the disk is attributed to Read Only. It is known to be a leading cause in the majority of cases. You can easily clear the Read Only attribute by using the diskpart utility, which allows the users to manage the disks efficiently. To clear the Read Only mode, follow the steps:
- Click Start Menu and type Command Prompt
- Right-click on the command prompt and then select Run As Administrator
- Once the terminal is launched, type the following command to use the diskpart utility
- After using the diskpart, type the below command to list all your volumes
- Now you have to select the volume causing the error, replace # with the volume you want to clear the Read-Only mode
select volume #
- Once you select, type the following command to clear the Read Only mode
attribute disk clear readonly
- After that, type the following command to check the current state of the disk. If the Ready Only mode value is No, that means the volume is no longer write-protected.
- Once done, now run the disk-checking commands to see if the error is fixed.
2. Remove Write Protection Via Registry Editor
If the above solution fails, try removing the write protection by using the Registry Editor. The registry editor is a database for the operating system to store and manage all the tasks. This error might not appear after disabling the write protection using the registry editor. Hence, follow the steps:
- Press Windows + R on the keyboard to open the Run program
- Type Regedit and click OK
- Once the Registry Editor is launched, navigate to the following path
Note: You can paste the following path in the address search bar for the fast navigation
- Now, if the Storage Device Policies key is not there, then create one under the Control
- Right-click the Control and hover on New and then click on Key
- Once the entry is created, name it StorageDevicePolicies
- Now right-click on the right pane, hover New and then click DWORD (32-bit) Value
- Name it Writeprotect and then double-click on it and change its value data to 0
- Once done, click OK
- Restart your computer and run the disk-checking commands to see if the error persists.
3. Repair Disk Errors
If you have any disk error in your target drive, it can lead to this issue. However, if you use some commands that ensure that there is no disk error, then you can think about something else. Regardless of checking the drive for the bad sectors, we have done everything that can fix this issue.
To check for disk errors, we will use chkdsk, a command line utility that allows users to check for the bad sectors and verify the integrity of system files in the target volume. To do so, follow the steps:
- Press the Windows key and type the command prompt
- Right-click on the terminal and choose Run As Administrator to launch with administrator privileges
- Once it is aunched, type the following command to check for the disk error and bad sectors
chkdsk D: /f /r /x
Note: Make sure to replace D with a faulty drive.
- If the errors are found, the utility will automatically fix them, so don’t worry
- Once done, check if the error is still occurring.
If none of the methods worked to remove the write protection, three possible factors that can lead you to this issue. One is that your drive might be encrypted. In that case, you will need to open a drive with a decryption key.
The second possible scenario could be that a virus in the drive prevents you from writing the content or using commands to the drive. In this case, you can use third-party antivirus software to scan a drive.
The third possible reason is that your drive is write protected by a third-party application. It would help if you used that software again to remove the write protection. These are some possible factors, and if one of them matches your situation, we recommend applying the solution mentioned above.
4. Scan Your Drive
If your end goal is to scan the drive, you can do this by following the steps below:
- Open the File Explorer, right-click the drive causing the error
- Go to Properties and then go to Tools from the top
- Click on Check
- If the UAC prompts, click Yes
- Then, click Scan Drive and wait for the scan to be done
If none of these methods worked for you it’s possible that your drive is corrupted or encrypted. Unfortunately, it’s also possible that your drive is physically damaged and if that’s the case you will have to contact a local data recovery center to get your data recovered.