108

At some point, the filesystem on my digital audio player has become read-only. I cannot copy files into it or remove files on it.

Are there some possible reasons for the player's file system to change permissions in this way?

I tried using chmod:

$ sudo chmod a+rw SGTL\ MSCN/ 
chmod: changing permissions of `SGTL MSCN/': Read-only file system

SGTL MSCN is the mount point of the digital audio player.

What else can I try to make it writeable?

| improve this question | |
  • Thanks! I already tried that, and same output. I will add this to my post. – Tim Jun 7 '11 at 20:03
  • 1
    Could you also add brand of the player? :) searching 'SGTL MSN' actually ONLY brings up this topic :D If you are really unlucky it's the device that's bugged: as a last(!) resort reset the player. But only when you do not get any good anwsers soon(ish) :) – Rinzwind Jun 7 '11 at 20:11
  • My bad. The name is "SGTL MSCN". – Tim Jun 7 '11 at 20:32
  • what are the mount options mount| grep SGTL ? – Emmanuel Dec 2 '13 at 16:54
  • 1
    Tried everything, and found a simple solution (heretic). Plug the usb to windows 8 or 7, click "repair external drive", go back to linux. Hope this helps someone. – alejoss Apr 18 '15 at 2:19
133

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)

| improve this answer | |
  • 4
    I'm trying this, and getting "DRIVE not mounted or bad option." – JeanSibelius Apr 15 '13 at 22:22
  • @mattshepherd if you have whitespace in the file name, you need to surround it with quotes. – Lekensteyn Apr 16 '13 at 8:23
  • No, no whitespaces. I, er, wound up doing it in Windows. – JeanSibelius Apr 16 '13 at 22:50
  • 1
    @XavierStuvw If read/write protected means readonly, ok. Otherwise you could try to wipe it and repurpose it. The wipefs command can be used on a partition to ensure that no filesystem is recognized. See man wipefs (part of util-linux). – Lekensteyn Aug 21 '16 at 16:37
  • 1
    @JoshuaSalazar how did you mount it? Perhaps you could create a new question and include such details, this comment section is getting a bit too large. – Lekensteyn Feb 16 '18 at 22:30
15

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.

| improve this answer | |
  • This solution works on my Ubuntu (installed along side with Windows 10) – TuyenNTA Dec 26 '18 at 13:48
  • thank you! saved me today. Karma flowing to you ⭐ – Nicola Marcacci Rossi Feb 11 '19 at 8:52
  • 1
    I'd like to add for future Googlers that doing this fixed the "New Steam library folder must be on a filesystem mounted with execute permissions" on Manjaro Linux and it's probably the same for other distros. – Thomas Boxley Dec 2 '19 at 21:41
  • Thanks for this! I'm dual booting Kubuntu and Windows 10 and I could not understand why sometimes I'm unable to mount a disk with write permissions! – keshav.bahadoor Sep 28 at 22:04
4

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.

| improve this answer | |
3

If the USB stick is mounted as read-only. Go to Disk Utility and unmount the disk. Then click on Check Filesystem if there are no problems remount the disk. After mounting the disk it should work correctly, at least that is how I solved this problem.

| improve this answer | |
1

In case it is a fixed drive and not a removable drive, you can add the entry permanently.

sudo vi /etc/fstab

Add an entry in the following format:

<file-system> <mount-point> <type> <options> <dump> <pass>

And then do:

mount -a
| improve this answer | |
0

In Case of Dual Booting Operating System (for me Windows 10 and Linux Mint 19.1), when windows10 was not properly shutdown, this problem will occur to my disk partition on the Linux,

The Solution is to start up the Windows 10 then shut it down properly.

Now you can write file to the partition on Linux again.

Hope this will help

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.