Share via


My Disk is Read-only, Help!

Recently I helped someone on an issue where the customer had a disk that was part of a Windows 2008 R2 Service Pack 1 Cluster. They could bring the disk online, but they couldn’t write to it. During the course of troubleshooting, they ran Diskpart and looked at the attributes of the disk. They found that the “Current Read-only State” attribute was set to Yes, but the “Read-only” attribute was set to No. This seemed strange at first that they would not BOTH be set to Yes or both set to No. They tried clearing the read-only attribute, but it would not set the “Current Read-only State” attribute to No even though the command did not return an error.

We found that the disk was set to read-only on the SAN and this was causing the problem. When you see the “Current Read-only State” set to Yes, this is the true read-only status of the disk. The “Read-only” setting just indicates if we as an OS have the disk set to read-only.

The following steps will show you how to use Diskpart to look at these settings and also how to clear them.

1. Open a command prompt, type in Diskpart and then press Enter.

2. Run the command “List Disk” and press Enter.

clip_image002

3. Decide which disk you want to look at and then run the command “Select Disk n” where n stands for the number you see from the previous command. In this case, I am going to look at disk 1.

clip_image004

4. To see the attributes of Disk 1 now that it is selected, run the command “attributes disk”.

clip_image006

As you can see, I had already set the disk to Read-only, so both the “Current Read-only State” and “Read-only” attributes are set to Yes.

5. To clear the “Read-only” attribute, run the command “attributes disk clear readonly”.

clip_image008

As you can see, now the “Current Read-only State” and “Read-only” attributes are set to No and the disk is now writeable. To exit Diskpart, just type the word “exit” and then press enter.

Hopefully this will help you understand these attributes and help you diagnose a read-only problem with your disk. Have a great day!

James Burrage
Senior Support Escalation Engineer
Microsoft Enterprise Platforms Support

Comments

  • Anonymous
    January 01, 2003
    I am having the same issue, but I was able to change the current read-only state to no after repeated attempts doing the attributes disk clear readonly. I am still not able to format this USB, it is a 8g Staples Relay. I am getting this: Diskpart has encountered an error: the semaphore timeout period has expired. The system Event log shows: The IO operation at logical block address 0 for Disk 2 was retried.

  • Anonymous
    August 18, 2011
    Hello James,I tried the above steps,. but no luck for me!! I have a USB stick ( which contains a Os) I want to format it, but I am getting a error " Disk Read Protected" So I can't change the Current Read-only  as "NO".. Any suggestion?? please... :(

  • Anonymous
    September 06, 2011
    i no this is really late and everything but i need your help i can set the read-only state to yes and no however the current read only state is stuck on yes.. how can i change this :(

    • Anonymous
      August 30, 2017
      attributes disk set readonly
  • Anonymous
    September 16, 2011
    after attributes disk clear readonly, my curretc read-only state still stuck at YES!!! help pls><

  • Anonymous
    December 22, 2011
    The comment has been removed

  • Anonymous
    January 05, 2012
    This post is pointless since it doesn't come with a solution to the problem.

  • Anonymous
    March 09, 2012
    Hi Raja,I'm sorry I didn't realize that this reply was here.  USB sticks tend to be a little different with their partition and formatting them.  If I were in your shoes, I would use diskpart and follow these steps:  WARNING:  This will delete all data and partitions from your USB stick.List Disk Find the disk in the list and see which number is assigned to it.  For this example, let's say it's disk 2. Select Disk 2 Clean Create Partition Primary Assign Format quick fs=ntfs

  • Anonymous
    March 09, 2012
    If you have a disk that is showing a Current Read-only State of Yes, but Read-Only is set to No, this means that at the hardware level the disk is read-only and we can't fix that through Diskpart.

  • Anonymous
    April 09, 2012
    my "current" status is set to yes, despite I changed the "read only" state to no... what shall I do??

  • Anonymous
    August 10, 2012
    Hi all,I also had this problem and noted this post did not fix the issue.  I was able to resolve this issue on my computer by modifying the following registry key from 1 to 0:HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlStorageDevicePoliciesWriteProtectSwitch from a 1 to 0.To do this open regedit from the start menu.

  • Anonymous
    August 11, 2012
    I used this utility to do the exact thing and I can't get the "Current read Only" state to turn to No.  Any switches or other advice?

  • Anonymous
    September 07, 2012
    What is the SAN? I am having this exact problem. The current readonly state is yes but readonly is set to no. Thanks

  • Anonymous
    March 25, 2013
    It still didn`t worked. the current read-only state is still yes!

  • Anonymous
    November 28, 2013
    The comment has been removed

  • Anonymous
    December 11, 2013
    My disk is working now. Thanks to James!

  • Anonymous
    February 05, 2014
    my kid is having a hard time reading

  • Anonymous
    March 21, 2014
    Command it is not working as too, the readonly still resist to read. I tried regedit as well

  • Anonymous
    March 29, 2014
    DEAR SIR,

    I HAVE A PROBLEM WITH MY PEN DRIVE WHEN I CLEAR MY ATTRIBUTES TO CLEAR READ ONLY, THEN THE STATUS OF READ-ONLY CHANGES TO NO AND THE STATUS OF CURRENT READ ONLY DO NOT CHANGE SO HOW TO CHANGE THAT SIR.
    HOPE YOUR ANS SOON

  • Anonymous
    April 05, 2014
    Thank you very much ... :)

  • Anonymous
    April 26, 2014
    It works great for me :-) thanks

  • Anonymous
    April 29, 2014
    boot disk yes
    page file disk yes
    craskdump disk yes
    everything else is no what do i do?

  • Anonymous
    June 09, 2014
    James,
    Thanks...this helped me to solve an important case without opening a problem with Plats :)

    Mujahid
    SQL Support
    Microsoft

  • Anonymous
    June 25, 2014
    It didn't work

  • Anonymous
    July 21, 2014
    How do i clear current read-only state, or rather, set it from yes to no?
    The "read-only state" is already set to no, but "current Read-Only State" is still yes
    Please help on this, I wish i could paste a screenshot so that u get it better. Plus clean has failed.

  • Anonymous
    August 06, 2014
    It Says "Diskpart failed to clear disk attributes"

  • Anonymous
    August 11, 2014
    i entered the cmd attribute disk clear readonly, even thought the problem is same,

  • Anonymous
    August 12, 2014
    Perfect, it was really what solved my issues.

  • Anonymous
    August 26, 2014
    this is not working for me my usb is still in readonly write protection , plz give me a another way

  • Anonymous
    October 17, 2014
    Hi i tried with your cmd but my problem is not solved..

    i tried to remove the readonly : YES ....................>to...........> NO ( it was sucess)
    but
    unable to remove the currect read-only state is :YES .............mode to.....> NO.... only pls help to remove the currect readonly state to..................: NO
    i think you can understand this problem..other wise provide me your mobile number i will contact u..

    i am facing my pendrives with this problem only..how to solve ...

  • Anonymous
    January 08, 2015
    This has saved my bacon twice!

  • Anonymous
    January 22, 2015
    Thanks mate works for me.... thumps up

  • Anonymous
    January 31, 2015
    please help I have same problem, current currect read-only state: yes an 2 pendrive´s
    see image http://static.yoreparo.com/imagenes/subidas/892662-Captura.JPG

  • Anonymous
    January 31, 2015
    d

  • Anonymous
    March 25, 2015
    Hi James, “attributes disk clear readonly” against my Storage Space virtual disk works fine, it clears the readonly attribute but causes the disk to go offline. If I use 'Online Disk" it brings the disk back online but then it becomes Readonly again.
    Online disk: brings it online in readonly mode
    “attributes disk clear readonly”: clears readonly but causes disk to go in Offline mode

    Do you know how to fix this, please?

  • Anonymous
    April 03, 2015
    But it doesn't work on another PC.

  • Anonymous
    April 13, 2015
    the current readonly persists

  • Anonymous
    April 22, 2015
    My read only state is yes and read only is no what shall I do.......

  • Anonymous
    May 06, 2015
    The comment has been removed

  • Anonymous
    May 08, 2015
    Great Article. But read only state is not belonged only to disks. Volumes can also be read only. I have been a vmware vm with 4 virtual disks. I tried the mentioned steps but, disks is rw. Tried the volume in place of disk and gotcha!

    Disks was rw but volumes was not.

    • Anonymous
      May 03, 2016
      This was the solution for me as well. Cleared read-only on the disk, but was not clearing it on the volume.After selecting the volume, use the following two commands:attributes disk clear readonlyattributes volume clear readonly
  • Anonymous
    May 19, 2015
    not workin bro still current read only state is set on yes!!

  • Anonymous
    June 24, 2015
    Hi James,

    I saw your feedback for Raja because we did have same problem. I tried your second option also. But finally the problem is still same. It says that it could not format as it is write protected. I also made an unsuccessful triy to fix it using regidit. Any other options??

  • Anonymous
    August 02, 2015
    Nice troubleshoot, worked like a charm for me; thanks.

  • Anonymous
    August 05, 2015
    patiently, I have tried all steps and if you happen to be in my shoes...you might really need to consider flashing the firmware...that's your last hope and kinda most of the time fix the issue.

  • Anonymous
    August 09, 2015
    my current read-only state says: yes
    read-only says: no
    what am I doing wrong?

  • Anonymous
    August 12, 2015
    My USB activated read only by itselfs and the "Current Read-only State" is "Yes" but the rest include "Read-only" are "No". Any idea? is that hardware problem of my USB?

  • Anonymous
    August 13, 2015
    thank you! :P it works!

  • Anonymous
    September 21, 2015
    This solution worked for me, I had fiber attached storage that automatically picked up setting.

    Thanks James

  • Anonymous
    November 05, 2015
    Thanks for sharing a useful article.

  • Anonymous
    November 22, 2015
    I did the same but it gave me "attribute failed"
    And this is with formated unpartitioned HDD

  • Anonymous
    January 05, 2016
    KING OF USB CURRENT READ-ONLY STATE: Your registry fix worked for me ... thank you VERY much. Any idea on what causes this?

  • Anonymous
    January 07, 2016
    The comment has been removed

  • Anonymous
    January 07, 2016
    In my case, By using command attributes disk clear readonly .
    Read-only cleared successfully, bt at the same time it change back again to read-only, anyone can help?

  • Anonymous
    April 17, 2016
    Trying to install Azure Stack and an getting a disk read-only error on disk F:. Microsoft Azure Stack POC is ready to deploy. Continue?[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): yReport-Progress : The Microsoft Azure Stack POC deployment failed.Start-PocFabricInstallerTasks : POCFabricInstaller failed because thefollowing tasks failed: CreateStoragePoolAt C:\ProgramData\Microsoft\AzureStack\Deployment\RunAzureStackDeploymentTask.ps1:158 char:19+ ... $result = & "Start-$moduleName`Tasks" -StatusUpdatedCallback {+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep tion + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio n,Start-PocFabricInstallerTasksAt C:\ProgramData\Microsoft\AzureStack\Deployment\Get-AzureStackDeploymentStatus.ps1:107 char:15+ $Result = Report-Progress($status)+ ~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Report-ProgressI go into diskpart & clear the read-only and it clears it, but when I look at the disk in Disk Management it is still read-only.I went in & reset the partitions & re-ran the Azure Stack deployment PS1 & even though the disks show up as online initially.Somewhere during the deployment procedure the disk is being set to read-only. Any suggestions?

    • Anonymous
      May 28, 2016
      The comment has been removed
  • Anonymous
    October 26, 2016
    Diskpart> list disk Disk ### Status Size Free Dyn -------- --------------- -------- ------- --- Disk 0 Online 298 GB 1024 KB Disk 1 Online 136 GB 1024 KB Disk 2 Online 136 GB 0 B Disk 3 Online 136 GB 0 B * Disk 4 Online 15 GB 0 BDiskpart> attributes disk clear read onlyDisk attributes cleared successfully.Diskpart> attributes diskcurrent Read-only State : YesRead-only : NoBoot Disk : NoPagefile Disk : NoHibernation File Disk : NoCrashdump Disk : NoClustered Disk : NoDiskpart>

  • Anonymous
    March 09, 2017
    The comment has been removed

  • Anonymous
    May 10, 2017
    It worked on my WD My Book (external HDD). I could not access My Book after I used the Seagate Seatools to erase the Zero track (to delete the partition table) on another Seagate drive. I was able to read only the data on My Book to copy whatever needed. I thought I had to scrap the drive after several attempts doing different things including using the Windows disk manager. Why Windows 10 does not have the feature to remove the Read Only? Anyway thanks for fix.

  • Anonymous
    August 22, 2017
    i was use attributes disk clear readonly command but massage are still Current Read-only State: Yes

  • Anonymous
    September 04, 2017
    Like many of these other folk, I am getting the:DISKPART> attributes diskCurrent Read-only State : YesRead-only : NoBoot Disk : NoPagefile Disk : NoHibernation File Disk : NoCrashdump Disk : NoClustered Disk : NoI have traced it to the Win10 Creator update, all the machines in my office that have the update don't work, and the ones that don't have it do work. We are a hardware manufacturer, and would really like to know what sets that flag.-Erik

    • Anonymous
      November 02, 2017
      There are many threads all over the Internet, especially on Microsoft Forums, regarding read only permissions that can not be changed, and not only on external drives (although it may be the most common) since, I think, Windows 7 in 2009. Typical "solutions" includecommand prompt> attrib -r +s pathDiskpart > List Disks > Select X > attributes disk clear readonlyUsing programs as AdministratorChanging a registry key Reducing the security level in Control Panel Users and AccountsProperties> Security,> Advanced, >owner, and then reassign owner to oneself (even though it is oneself) The latter worked for me on a copy of the USB drive and STRANGELY allowed me also to access my USB drive again! Though in both cases the directories say that they are read only (so I am worried for the future). Also my backup software is not working (AJC Sync) saying that my USB drive is still unavailable. Another "solution" that worked for me in the past was copying out the files (somehow I managed to make them not-read only if not in name) and then use the apacer USB 3.0 drive repair utility which is no longer on the Apacer site but can be downloaded somewhere. Without it I would have had to have scrapped a USB drive that had become read only. I would like Microsoft to create a repair program with a GUI to do all the above, and more, to allow us to change and turn off the read only property.