Page 1 of 1

usb flash drive gets mounted read only

Posted: Fri Oct 23, 2009 4:08 pm
by oakhilltop
I have a 16G Kingston Data Traveler that has worked for awhile, but now gets mounted as read only in Mint. I've tried it on 2 computers running Mint 7 and they both mount it read only. I think, sometimes it doesn't get mounted read only, but when I try to transfer a lot of files it switches to read only after a few files were written. When the drive was mounted read only, I unmounted it, put it in a windows pc and it worked fine. Go back to Mint, and its read only. The drive is not that old, so I'm pretty sure I am not beyond its writing limits, and I can delete files in windows.

This happened once before and I re-formatted the drive using gparted. It worked for awhile, but is not back to this problem.

Re: usb flash drive gets mounted read only

Posted: Fri Oct 23, 2009 4:13 pm
by MaddogF16
What does your /etc.fstab file look like.

Re: usb flash drive gets mounted read only

Posted: Fri Oct 23, 2009 7:28 pm
by oakhilltop
Here it is. Thanks. It did mount as writable for awhile. Last night I copied some large digital video files to it. Today, it seemed like it was writable until I copied a bunch of pictures to it. I had deleted the video files, and there is about 11G free space on it.

/etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda5 during installation
UUID=d068f478-ec1c-425b-8fa5-1ef075ab4d44 / ext3 relatime,errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=d3a6f6a2-efd1-4686-bda3-31d2633d698a none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

Re: usb flash drive gets mounted read only

Posted: Fri Oct 23, 2009 7:37 pm
by oakhilltop
Hmmm, I shutdown the laptop and turned it back on a few hours later, put the flash drive in and now it is writable again. Perhaps, something goes wrong while copying a bunch of files, then the OS marks it as read only?? Maybe some USB error handling code can't handle the error case.

Re: usb flash drive gets mounted read only

Posted: Sat Oct 24, 2009 12:28 am
by mick55
hi oakhilltop

One of my friends had the exact same problem,
and then he noticed the USB drive had a tiny slide switch
to make it write protected.

Every time he pushed it in or pulled it out
he toggled the switch.

It's probably not your issue, but you never know :wink:

peace
mick

Re: usb flash drive gets mounted read only

Posted: Sat Oct 24, 2009 11:07 am
by oakhilltop
No, no switch, but thanks. I tried it this morning and it is writable again. Seems like it goes read only, when I really want to get something done! :(

I'm not sure how to debug it when it happens.

Re: usb flash drive gets mounted read only

Posted: Mon Oct 26, 2009 5:18 pm
by MaddogF16
When it happens take a look at your /etc/fstab file and copy it here.

Re: usb flash drive gets mounted read only

Posted: Tue Nov 03, 2009 8:20 am
by Midnighter
What is it formatted as? Fat32 or NTFS?

Re: usb flash drive gets mounted read only

Posted: Wed Nov 18, 2009 6:45 pm
by Rank0
You could also try the command dmesg when the switch to read only happens and see if that log contains anything interesting.

Re: usb flash drive gets mounted read only

Posted: Sat Jan 16, 2010 10:04 pm
by phd7
I had the same problem before with one of these with windows (at work, I hasten to add). I tried going into permissions and changing that but nothing worked. Ended up just binning it and sticking with Fusion drives. I have never had a similar problem with them. Hopefully someone else can help you but I would copy the lot to another drive and bin that one.

Re: usb flash drive gets mounted read only

Posted: Sun Jun 13, 2010 10:56 am
by cluendo
I have the same problem with USB stick. in dmesg I've got those lines:

[ 1763.897947] FAT: Filesystem error (dev sdd1)
[ 1763.897950] fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1763.897954] File system has been set read-only
[ 1764.905287] FAT: Filesystem error (dev sdd1)
[ 1764.905290] fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1766.495348] FAT: Filesystem error (dev sdd1)
[ 1766.495351] fat_get_cluster: invalid cluster chain (i_pos 0)

Re: usb flash drive gets mounted read only

Posted: Wed Jan 02, 2013 7:03 pm
by pyrus
I had the same problem with various types of USB memory sticks on Mint 13 Maya (MATE edition). I actually had two problems:
a) One of my sticks (that I had copied from the Mint ISO) was formatted as an ISO-9660 (CD) format filesystem
b) Other sticks were mounted read-write but my user only had read-only access to them

For the first problem I guess I'm stuck with the restriction of the filesystem, but for the others I created a UDEV rule to give myself read-write access as follows:

1. Create a file in /etc/udev/rules.d, e.g. 90-usb-disks.rules
2. Place the following in the new file:

Code: Select all

# UDEV Rules to change the permission of USB disks
#

KERNEL=="sd*[0-9]", ATTR{removable}=="1", ENV{ID_BUS}=="usb", MODE="0666"
In Mint I didn't even have to restart the UDEV service as creating the file triggers the new rules to be loaded :D

This is based on the advice on AskUbuntu here: http://askubuntu.com/questions/17540/ho ... able-drive with changed MODE value.

Re: usb flash drive gets mounted read only

Posted: Mon Jul 15, 2013 10:39 pm
by ben2talk
Not with Caja in Mint

Re: usb flash drive gets mounted read only

Posted: Mon Jul 15, 2013 10:46 pm
by gollum17
Hmm I'm also curious to see if your solution works pyrus as I had tried something similar. Even making a usbuser user group and setting it up from there with no dice. I still get the "Only root can mount this device" error.

I'm going to keep chugging away at it and see if I can get anything going. Btw I'm on mint 15 main edition.

Sprint GS3 Running TN's Msg and Chubbs

Re: usb flash drive gets mounted read only

Posted: Thu Oct 24, 2013 10:45 pm
by ongdenny
Hallo,

I tried these steps:
cd /media/your_username/your_flash_drive
sudo chmod -R -v 777 *
sudo chown -R -v your_username:your_username *

Still had problems when copy paste from cinnamon, but when i go through terminal, it's writteable.

I'm on Mint 15 Cinnamon

Re: usb flash drive gets mounted read only

Posted: Mon Dec 14, 2015 11:42 pm
by beachgardener
This happened to me today, all of a sudden usb sticks are read only, what? Anyway using 17.3 Cinnamon, tried various methods found on forum, to fix, but what worked was to take it to a windows 7 machine and delete partition, create new volume and choose slow format and fat32. This worked. Anyway I wonder if the hardware section in control centre, (and I'm surprised it is spelled "center" from an Irish based distro :), needs a usb format and permissions section, or a better usb stick formatter with options for slow format. There seemed no way I could change permissions, I tried opening file manager as root, choose usb stick permissions tried changing there, but no go. There may have been a way via terminal but didn’t find that information, the thing is, there is nothing wrong with the sticks, they worked in other Mint machines and Windows 7 machine, just one Mint machine it did not work on that has recently updated from 17.2 to 17.3 via update manager.

Re: usb flash drive gets mounted read only

Posted: Mon Aug 17, 2020 1:15 am
by shubhkrishna19
I Found the easiest solution!!
Note: This is not for boot partitions as it may corrupt it.

just simply enter the command:
sudo ntfsfix /dev/PARTITION NAME
for eg: /dev/sda1

This method can be used for hard drives and usb sticks too !
I had problem with the read and write on my other hard disks connected to my pc but it just fixed it!

I found this method on a website, Their warning is here as follows:


There is also a third option - the ntfsfix command (part of the ntfs-3g package), which repairs some NTFS inconsistencies, resets the NTFS journal file and schedules a NTFS consistency check for the first boot into Windows. This might corrupt your Windows installation though, so it's not recommended, that's why I I didn't add it as an option.

But this is worth a mention because it can be useful in some cases. For example, if you no longer have Windows 10 or 8 installed, but a NTFS partition was left in a hibernated state. In such cases, you could use sudo ntfsfix /dev/NTFS_partition (for example /dev/sdb1) to get the partition to mount with full read/write access


So basically, DO NOT USE THIS METHOD ON YOUR WINDOWS INSTALLED PARTITION!!!!!