PowerEdge: The error "The media is write protected" appears when editing a file in Windows

Summary: A write-protected disk in Windows prevents changes to any data on the disk. This article shows how to correct this.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

When trying to create new files or modify existing files, the error "The media is write protected" appears. You are unable to modify any data on the disk.

Cause

The volume or disk may be in a read-only state. The diskpart command-line tool can be used to confirm and address this.

Resolution

To use diskpart to check and modify the attributes of the volume and disk, follow these steps:
  1. At an elevated command prompt, launch the diskpart tool with this command:
diskpart
  1. At the diskpart prompt, type the following command to list all volumes in the system. Make a notation of the number of the affected volume.
list vol
  1. Type the following command to select a specific volume, replacing # with the number of the affected volume:
select vol #

For example:
select vol 3
  1. Type the following command to list the attributes of the selected volume:
 attrib vol
  1. If the volume's Read-only attribute is set to Yes, type the following command to clear this attribute:
attrib vol clear readonly
  1. Type attrib vol again and confirm that the volume's read-only attribute is now set to No.
  2. It is also possible that the disk which contains the volume is in a read-only state. To verify whether this is the case, type the following command. It is not necessary to select the disk first. Selecting a volume also selects the disk which contains it.
attrib disk
  1. If the disk's read-only attribute is set to Yes, type the following command to clear it.
attrib disk clear readonly
  1. Type attrib disk again and confirm that the disk's read-only attribute is now set to No.

You should now be able to modify the data on the affected volume.

Additional Information

This video illustrates the procedure:

Fix a Disk in Write Protected Mode

Duration: 00:03:50 (hh:mm:ss)
When available, closed caption (subtitles) language settings can be chosen using the Settings or CC icon on this video player.

Affected Products

Microsoft Windows Server 2016, Microsoft Windows Server 2019, Microsoft Windows Server 2022, Microsoft Windows 2012 Server, Microsoft Windows 2012 Server R2

Products

PowerEdge M640, PowerEdge M640 (for PE VRTX), PowerEdge MX740C, PowerEdge MX750c, PowerEdge MX760c, PowerEdge MX840C, PowerEdge R240, PowerEdge R250, PowerEdge R260, PowerEdge R340, PowerEdge R350, PowerEdge R360, PowerEdge R440, PowerEdge R450 , PowerEdge R540, PowerEdge R550, PowerEdge R640, PowerEdge R6415, PowerEdge R650, PowerEdge R650xs, PowerEdge R6515, PowerEdge R6525, PowerEdge R660, PowerEdge R660xs, PowerEdge R6615, PowerEdge R6625, PowerEdge R740, PowerEdge R740XD, PowerEdge R740XD2, PowerEdge R7415, PowerEdge R7425, PowerEdge R750, PowerEdge R750XA, PowerEdge R750xs, PowerEdge R7515, PowerEdge R7525, PowerEdge R760, PowerEdge R760XA, PowerEdge R760xd2, PowerEdge R760xs, PowerEdge R7615, PowerEdge R7625, PowerEdge R840, PowerEdge R860, PowerEdge R940, PowerEdge R940xa, PowerEdge R960, PowerEdge T140, PowerEdge T150, PowerEdge T160, PowerEdge T340, PowerEdge T350, PowerEdge T360, PowerEdge T440, PowerEdge T550, PowerEdge T560, PowerEdge T640 ...
Article Properties
Article Number: 000214733
Article Type: Solution
Last Modified: 10 Dec 2024
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.