We recently had an issue with a hard disk on one of our servers reporting that it was set to read only. It occurred after an unknown error with the system. Windows refused to allow us to write to the disk and stated that the "Media was Right-Protected."
We also found that the read only attribute was nowhere to be found on the properties of the disk, so that we could remove it. To cut a long story short, it can only be removed using the Diskpart Utility with the following commands.
Diskpart is run from the command prompt and launched by typing "diskpart" and hitting enter.
First thing you need to do is to identify your disk within the utility: Use the "list disk" command and then use the following.
"select disk" [identifying number of your disk]
"detail disk" - This will give you a complete synopsis of your disk and will tell you if readonly is switched on. If it is use: "ATTRIBUTES DISK CLEAR READONLY".
This will clear the write protect from the disk. You can check if it has cleared the problem by running the "detail disk" command again and/or attempting a file copy to the problematic disk. We found that it wasn't successful even though the attribute had been cleared. We then found that the volume was set to readonly too.
"list volume" - To Identify the drive [By drive Letter]
"select volume" [volume number]
"detail volume" - This gave us a complete synopsis of our drive and told us that readonly was switched on on the volume aswell.
"ATTRIBUTES VOLUME CLEAR READONLY"
This cleared the write-protect and fixed our problems almost instantly. Again yo ucan check using "detail volume" and testing the write on the disk.
In some cases a reboot of the server is required, but we found everything worked fine without.