Что я могу сделать, если мой USB-накопитель защищен от записи или доступен только для чтения?

20130
bwDraco

Когда я подключаю флэш-накопитель USB, он отображается на моем компьютере как защищенный от записи или только для чтения . Я не могу передать данные на него, а также не могу изменить или удалить файлы, уже сохраненные на нем. Я также не могу переразбить или переформатировать диск с помощью Windows Disk Management, DiskPart, GParted или других инструментов. На диске нет переключателя защиты от записи.

Почему это произошло и что я могу с этим сделать? Есть ли способ снять защиту от записи? (Обратите внимание, что это может происходить и с некоторыми картами памяти, поскольку они часто используют контроллеры, подобные тем, которые используются во флеш-накопителях.)

Этот вопрос часто возникает, и ответы обычно совпадают. Этот пост предназначен для того, чтобы дать окончательный, канонический ответ на эту проблему. Не стесняйтесь редактировать ответ, чтобы добавить дополнительные детали.

30
Соответствующий мета-вопрос: http://meta.superuser.com/questions/11820/canonical-question-on-usb-flash-drives-becoming-write-protected Поскольку этот вопрос является каноническим, просьба не голосовать закрыть это как дубликат других вопросов; вместо этого другие вопросы должны быть закрыты как дубликат * этого * вопроса (как только это станет возможным). bwDraco 7 лет назад 2
Проголосовал за закрытие 32 вопросов как дубликатов этого вопроса (и связанных с этим вопросом еще на одном); см. http://superuser.com/questions/linked/1125282. bwDraco 7 лет назад 0
Возможный дубликат [Почему мой USB-накопитель теперь доступен только для чтения?] (Http://superuser.com/questions/543067/why-is-my-usb-flash-drive-now-read-only) bgmCoder 7 лет назад 5
This is the duplicate question, having only been asked 11 hours ago. The duplicate question is always the newest one. Normally folks don't ask a question and then flag all the older ones as duplicates. However, I agree some of the ones in your list *are* duplicates, but not all - the scope differs on the majority. bgmCoder 7 лет назад 0
@bgmCoder: новейший вопрос не всегда дубликат; см. http://superuser.com/questions/1061528/windows-7-slow-at-opening-media-files#comment1510559_1061528. Больше информации по каноническим вопросам: http://meta.superuser.com/questions/778/one-question-to-rule-them-all-questions-on-superuser bwDraco 7 лет назад 2
@bgmCoder: Действительно, причина, по которой этот вопрос существует, - это [номер телефона] (http://superuser.com/questions/linked/1125282) из ​​«моя флешка защищена от записи!» вопросы на этом сайте. Идея состоит в том, чтобы объединить их в один канонический вопрос. bwDraco 7 лет назад 4
Well, I have 11 points on my question and I don't want to lose them; maybe we can consolidate to mine? And I was 3 years earlier - that should count, you know. bgmCoder 7 лет назад 0
Давайте [продолжим это обсуждение в чате] (http://chat.stackexchange.com/rooms/45511/discussion-between-bwdraco-and-bgmcoder). bwDraco 7 лет назад 0
@bgmCoder Вы не потеряете свои мнимые баллы, если ваш вопрос закрыт как обман. DavidPostill 7 лет назад 3
Ну, мне действительно все равно, и я не хочу тратить на это больше времени. Вы будете делать все, что захотите - у вас больше воображаемых очков, чем у меня, в любом случае, но я чувствую себя немного натянутым. bgmCoder 7 лет назад 0

3 ответа на вопрос

30
bwDraco

If the drive appears to be write-protected, start by inserting the drive into another computer to isolate the cause of the issue.

If you're able to write to the drive from another computer, you might be experiencing one of the following problems:

  1. Filesystem corruption. The drive might have a corrupted filesystem or other issue (possibly specific to a particular computer or OS) that can be corrected by using CHKDSK or a similar utility. If this addresses the problem, your drive is probably working normally. It's also important to eject the drive properly before removing it or at least wait until the drive has finished writing, as removal of the drive while it is writing data can cause low-level data corruption.

  2. Incorrect Group Policy settings. If you're running Windows, it's possible that your system's Group Policy may be disallowing writing to external storage devices, including USB flash drives. The registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\StorageDevicePolicies should either be absent or set to 0; if it is set to 1, Windows will not allow writing to external storage devices.

  3. (SD cards only) Broken or altered write-protect switch in the card slot. The mechanical lock switch on an SD card is not connected to its electronics:

    It is the responsibility of the host to protect the card. The position of the write protect switch is unknown to the internal circuitry of the card.

    This means that hardware and software other than the card itself is responsible for checking the lock state of the card. If this mechanism isn't working as designed, a SD card can appear to be write-protected even if it is otherwise functioning normally. Typically, this can be addressed by replacing the card reader, although faulty drivers or incorrect software configuration can also cause this problem.


If the drive is read-only no matter what computer you plug it into, or you've tried the above steps to no avail, then the drive has probably experienced a fault condition, and it's generally not possible to remove write protection from a faulty flash drive. This behavior is typical of flash drive controllers when they detect a problem with the underlying NAND (e.g. too many bad blocks). The write protection is intended to prevent this condition from actually causing data loss, e.g. the NAND becoming unreadable altogether. For example, SanDisk customer support says:

Write protection errors occur when a flash drive detects a potential fault within itself. The drive will go into write-protected mode to prevent data loss. There is no method to fix this.

Note that depending on the drive, there may in fact be ways to disable (or more accurately, reset) the write protection by reprogramming the flash memory controller, such as by using the techniques listed under "Potential Hardware-Specific Restoration" in this answer. Doing this is not a good idea because the write protection signals that a problem has been detected by the controller; overriding this and continuing to write to the drive could result in data loss.


The upshot of this behavior is that any data on the drive is still accessible. Because the drive is failing, you should back up the contents of the flash drive as soon as possible and replace the drive. (If the drive contains sensitive information, be sure to physically destroy it before you dispose of it.)

Getting data off the drive may be tricky because some data corruption may have already occurred by the time drive went into read-only mode. This commonly manifests itself as the filesystem experiencing low-level corruption causing the filesystem to appear as RAW or the OS prompting the format the drive. Recovering from this kind of corruption can be complicated because the filesystem cannot be directly repaired—the drive is, after all, write-protected.

You may be able to retrieve data from a drive corrupted in this manner by using data recovery utilities such as the open-source TestDisk. You can also get a drive of equal or greater capacity and copy over the failing drive's contents sector by sector onto the new drive using GNU ddrescue, and follow up with a CHKDSK to fix the filesystem errors. If these fail, and the data is particularly valuable, you could send the drive to a dedicated data recovery service; however, these services tend to be very expensive due to their highly specialized nature and are rarely worth it.

The details compiled by wbDraco are impressive, but they lack a conclusion, IMHO. And the conclusion seems to be that it is a manufacturer's fault, and therefore the faulty device must be replaced free of charge. Period. Is there any statistics which particulat bridge ICs (or IC steppings) are prone to this problem? Ale..chenski 7 лет назад 0
Это не секвестр. Я не упомянул о производителе накопителя, и контроллер накопителя или USB-мост - это не то, что беспокоит большинство людей (если только накопитель не является «твердотельным накопителем» или аналогичным устройством). Вывод заключается в том, что необходимо создать резервную копию содержимого диска и заменить его. bwDraco 7 лет назад 1
Maybe this is the problem that you (and other people) failed to establish any correlation with any particular controller chip inside the flash? I personally had managed a collection of hundreds of pen drives (for inter-operability and performance exercises), with substantial abuse of them, and I never had this experience with sudden write protection. I still have about 40 pen drives of all varieties, and still see not a single problem of this sort yet. Therefore there must be some specific batch of ICs, for which unfortunate folks should be reimbursed. Ale..chenski 7 лет назад 0
7
陸普世

Я обнаружил, что мой Transcend StorageJet был установлен только для чтения. Это может быть написано на другом компьютере, но не на моем ноутбуке. (Обе системы Win7)

Я не нахожу странных кодов, например WriteProtect, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Controlв моем реестре.

Наконец-то я нашел это решение и теперь оно может работать! (Я исправляю некоторые ошибки и добавляю свои собственные выражения из справочной статьи.)

Чтобы решить эту проблему, вы должны использоватьdiskpart :

  1. Откройте командную строку с правами администратора (щелкните правой кнопкой мыши> Запуск от имени администратора).

  2. Введите diskpart и нажмите Enter. Вы можете видеть, что командная строка изменена на DISKPART>

  3. Перечислите диски, набрав:

список дисков

  1. Выберите внешний USB-диск, набрав (в моем примере внешний диск был диск 2):

выберите диск 2

  1. Перечислите объем, набрав:

объем списка

  1. Выберите том, набрав (в моем примере внешний диск использовал том 4):

выберите объем 4

  1. Показать детали объема:

подробный диск

  1. Показать детали объема:

объем детализации

(Вы можете найти атрибуты только для чтения выбранного диска и тома, для которых установлено значение YES)

  1. Установите атрибуты только для чтения для диска и тома, которые будут отключены:

атрибуты диска очищены только для чтения

атрибуты громкости ясно только для чтения

  1. Выполнить детали диска и детали диска еще раз, чтобы проверить атрибут только для чтения. Напишите что-нибудь на свой внешний USB HD.

Смотрите также

Внешний жесткий диск Только для чтения Проблема и решение

Параметры командной строки DiskPart

5
T.Todua
  1. Убедитесь, что «Переключатель защиты от записи» не заблокирован: Flash drive with physical lock switch

  2. В некоторых случаях могут помочь низкоуровневые инструменты форматирования (но для полного форматирования требуется несколько часов. Также резервируйте файлы.): Https://www.protectpages.com/blog/free-file-recovery-software/

Похожие вопросы