USB flash drives become read-only

Please post suggestions for improvement of Cinnamon here
Level 1
Level 1
Posts: 6
Joined: Thu Mar 15, 2018 10:04 am

Re: USB flash drives become read-only

Post by naseeb » Wed Dec 12, 2018 12:12 pm

"Ansmann wrote:

So everything needed to fix the issue is to execute:

Code: Select all

sudo chmod 777 /media/USERNAME

Hope it helps!

Edit: I'm using Mint 17.1 Cinnamon"

It works for me after reboot. I am using 18.3 Cinnamon.

Level 1
Level 1
Posts: 13
Joined: Sun Jul 21, 2019 10:04 pm

Re: USB flash drives become read-only

Post by ronee » Fri Oct 11, 2019 5:37 pm

Hi all,
My USB sticks have always (3 years) worked just fine. However recently just moving a jpg from one folder to another it locked the stick.
I have tried all the suggestion presented and got nothing but bad command, unknow command etc.

My other sticks worked fine. The solution? I put the locked stick in a win 7 machine and let it "fix" the usb stick. The all locked fikes now work properly in my Linux Mint 18.3!


Level 1
Level 1
Posts: 1
Joined: Tue Nov 26, 2019 11:53 am

Re: USB flash drives become read-only

Post by HappyMintUser69 » Tue Nov 26, 2019 12:25 pm

I've ran into the exact same issue twice (the latest being this morning) since I switched to Linux Mint earlier this year (19.1, 19.2), and despite these two occurrences having the exact same symptoms, the specific nature of the problem was slightly different in each case and required a different fix that did work in the end. I did not try the fixes mentioned here relating to root ownership, as I didn't have to, and in retrospect it is highly possible that these fixes addresses actual different issues that will also produce the exact same symptoms (i.e. USB key suddenly being read-only) so I won't comment on them and simply provide these as complementary fixes to a common problem that seems to have various sources. These may be better to try first though, as they don't involve actively changing system settings meddling with root privileges.

I have found these two fixes on other boards on the net, so I will put the fixes here along with the link where I found it so people can read it in the broader context of its original thread. These two fixes addresses the issue of USB keys retaining some sort of "open" or "dirty" state from a previous Windows session due to various circumstances (hibernate mode, crash, etc...) that keeps them in read-only mode. Hope that this will be useful to future readers of this thread, as this problem isn't likely to go away anytime soon seeing that it's been lingering around since at least 2012.

Fix 1 : How to clear the read-only attribute in the USB key partition :
(Done from Windows)
Open cmd.exe as administrator. Then run the following commands:

Type in

Code: Select all

and press enter. This will open command line based disk management utility, indicator will change to DISKPART>
Within diskpart, type

Code: Select all

list disk
and press enter. This will show all connected disks. Notice the "Size" column and make a note of the disk # you are concerned with.
Now type

Code: Select all

select disk X
where X is the numerical digit from step 2.
To see its attributes, type

Code: Select all

attributes disk
and press enter.
Now that we've ensured it is indeed a read-only disk (if it isn't, try Fix #2), we will need to clear the flag. Simply type

Code: Select all

attributes disk clear readonly
and press enter. This should clear the read-only flag.

answered Nov 12 '16 at 14:15 by anonymous coward
Original thread : ... -read-only

Fix 2 : How to clean the "dirty bit" :

(Done from Linux)

Run the following commands on the terminal(ubuntu) to give write permission to a Pendrive.

Code: Select all

df -Th

Code: Select all

umount /media/madusanka/KINGSTON
"/media/madusanka/KINGSTON" is "Mounted on" value that is given by the first command (simply adapt the path to your system's)

Code: Select all

sudo dosfsck -a /dev/sdb1
"/dev/sdb1" is "Filesystem" value that is given by the first command. Adjust according to what df -Th listed your drive as.

Enter your password

It should now say that the "dirty bit" as been cleared. Check the Pendrive by pasting or creating a new file.

answered Sep 27 at 9:51 by Shirantha madusanka
Original thread : ... -read-only

Hope that helps.

Post Reply

Return to “Cinnamon”