5

My 8 Gb pen drive has suddenly change to read-only. In fact 2 pen drives have changed to read-only.

I don't know about how the first pen drive changed into read-only, but with the second pen drive I tried to make a bootable pen drive using start-up disk creator. In the middle of writing suddenly it threw some error. After this I couldn't copy any files to the drive or delete any file from it any more.

How can I make a read-only drive writeable?

Zanna
  • 70,465
Hari Prasath
  • 59
  • 1
  • 1
  • 2

1 Answers1

1

find /dev/sdb -type f -exec chmod 666 {} \;

will make all the files read-writable by all { -rw-rw-rw- }

find /dev/sdb -type f -exec chmod 644 {} \;

will make all files readable by all and writable by the owner { -rw-r--r-- }

-

assuming the flash drive is /dev/sdb (which is typical - but your mileage may vary).

K7AAY
  • 17,202
  • 1
    You can find the /dev/... device name with sudo fdisk -l... – Wilf Dec 10 '13 at 16:54
  • According to the duplicate question (http://askubuntu.com/questions/47538/how-to-make-read-only-file-system-writable), chmod won't work because it is a write operation :/ – Ben Jan 22 '14 at 15:29