[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: USB flash drive opens read only -- how to fix?

Le 03/10/2019 à 05:05, David Christensen a écrit :
On 10/1/19 11:51 PM, tomas@tuxteam.de wrote:
Yep. Never forget -- there's a whole computer with its own OS in
your flash drive. That "write protect" (sometimes) available as a
physical switch is just communicated to your drivers via some
protocol over USB.
It was my expectation that the write-protect switch is read by the flash drive controller, and that the flash drive controller will enforce read-only behavior (e.g. prohibiting writes).  Do you have information indicating otherwise?

On the contrary. The usb-storage module has a parameter "quirks" which allows to ignore the write-protect flag for a specific vid:pid device (I do not remember the exact syntax). I was afraid that it could be used to by-pass the write-protect switch so I tested it with my only flash drive with a write-protect switch on. Although the kernel considered the drive as writable, any write attempt resulted to an error.

It is my understanding that Tomas meant that the write-protect switch does not cut the transmission of the electrical write signal to the flash memory chips and that the USB mass storage protocol also includes rejecting write commands, not only advertising the write-only flag.

Reply to: