- I assume you (your unix user) owns the device or at least has sufficient permissions on it (for example if you are root).
- If the command
lsblk -o NAME,FSTYPE,MOUNTPOINT,PARTLABEL,SIZE,ROshows your device as read only (RO=1), you can try to executehdparm -r 0 /dev/sdb5. This disables the read only flag in the kernel (according toman hdparm).
Additional info:
These steps helped me with a micro SD card that should not have been read only (micro SD cards have no "lock" switch but my adapter did not have one either and was recognized as locked). I found this solution here.
Wikipedia explaines that the physical lock switch on SD cards can but need not be respected by the software: link to Wikipedia