How to make read-only file system writable?
If a filesystem has been mounted read-only, chmod
will not work since it's a write operation too.
Try remounting it read-write:
sudo mount -o remount,rw '/media/SGTL MSCN'
If the device has a write lock on it (like SD memory cards), you need to turn it off. Hardware locks cannot be disabled by software. Note that the write lock on SD memory cards is located from the sight you see the letters near the up left corner and it looks like a very small switch.
Some filesystem drivers may also not support write operations, this is the case with the older NTFS module supported by Linux. For NTFS filesystems, be sure to use the ntfs-3g
driver which should be picked automatically nowadays. If not, you can force the driver with something like:
sudo mount -t ntfs-3g -o uid=$(id -u) /dev/sdb1 /mnt/
(where /dev/sdb1
has to be substituted for your block device and /mnt/
for your destination)
For NTFS file systems this problem may occur when it is not properly unmounted (probably by unexpected shutdown of windows). In such cases the file systems are marked as locked.
You can mount them properly using the following ntfsfix
command, for example:
sudo ntfsfix /dev/sda3
Please replace /dev/sda3
with your own device name.
I had this problem occur on several USB sticks. Each time I searched for an answer and tried various suggestions, including using Terminal to run commands, reformatting on both Linux and Windows machines, etc. All to no avail.
It happened to me again today so again I went looking to see if I could find a solution. I tried the things here, but they didn't work.
Out of desperation I again went to Disk Utility. I unmounted the drive and then hit "Format" on the partition portion, not the drive portion - USB only had the single partition. This time it WORKED!!!!. Then I went to the drive portion and again reformatted the single partition as a master boot drive and monkeyed a bit more with it.
The upshot is, I'm now able to read and write to the drive again.
I don't know if I just got lucky this time or not. But it is working again.