mounted partitions are often read-only

I’ve had this problem since I started with Ubuntu. When I mount a partition or device (my USB stick, my external HD or sometimes a CD-Rom, never so far an internal partition such as C: or D:) every other time it allows no read or write (for example I just mounted my external HD - two of the partitions gave me no read or write and the other was fine). When this occurs it continues to occur if I unmount, eject, log off, log back in and remount - it only starts working if I restart. As you can imagine this is frustrating if I’m just trying to access one document on my USB, for example.

Is this a known issue? Is there a fix? Thanks in advance

It’s going to be large, but when it next mounts them read-only, can you send the output from:

dmesg

Are these all USB devices formatted as NTFS or FAT/FAT32 ?

No, the NTFS ones are fine, the Ext4 ones are the problem. the output is too big for the forum, so it’s in a google doc here: https://docs.google.com/leaf?id=0B37iap042y2cZWM0YzMwNGUtOTdhYi00NzNkLThjMjQtMmIyMmEwMjg2ZGU5&hl=en_US&authkey=CJOa4cwM

Can you leave them plugged in (whilst in a read-only state) and send the output from:

mount

and

sudo fdisk -l

Just as a matter of interest, do the other devices still mount read-only if there is NO CD in the CD drive ?

And what happens if you try to remount them read-write from the command line:

sudo mount -o remount,rw /dev/sdXY

(where X and Y are the drive and partition designation)

Results from mount:

/dev/sda5 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/gabriel/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=gabriel)
/dev/sdb4 on /media/b186cac7-ad77-486c-ab3a-6f9df196f2c0 type ext4 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdb1 on /media/fde98b82-6d5e-4ae6-a0af-4b7638f5fdb1 type ext4 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdb3 on /media/647cc4f6-7f77-4fa1-bd04-12ce9b657c73 type ext4 (rw,nosuid,nodev,uhelper=udisks)

Results from sudo fdisk -l:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9f46a8cd

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1551    12451840   27  Unknown
/dev/sda2   *        1551       13489    95893504    7  HPFS/NTFS
/dev/sda3           13489       16499    24175050+   7  HPFS/NTFS
/dev/sda4           16499       19458    23768065    5  Extended
/dev/sda5           16499       19329    22736896   83  Linux
/dev/sda6           19329       19458     1030144   82  Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dae44

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       13055   104857600   83  Linux
/dev/sdb2          121342      121602     2085889    5  Extended
/dev/sdb3           13055       26109   104857600   83  Linux
/dev/sdb4   *       26109      121342   764958720   83  Linux
/dev/sdb5          121342      121602     2085888   82  Linux swap / Solaris

Partition table entries are not in disk order

There was no CD in the CD drive originally - I guess you’re noticing the CD drive in dmesg? I’m not sure why it comes up. Also in BIOS, in the multiboot menu, it offers boot from CD Drive even when there’s nothing in.

sdb1 and sdb3 are the ones that keep coming up with no read or write. If I type sudo mount -o remount,rw /dev/sdb1 (or sdb3) they’re still no read or write.

Strange… I can see no problem with the mounts ???

Let’s see if it is a nautilus issue, can they be seen from the command line… try:

ls -a /media/fde98b82-6d5e-4ae6-a0af-4b7638f5fdb1

and just to make sure it’s not a permission thing, also try:

sudo ls -a /media/fde98b82-6d5e-4ae6-a0af-4b7638f5fdb1

What is the output ?

They both fully list the contents - but they also fully list in nautilus. The problem is when I go into the folders (e.g. on my music partition, ls -a /media/fde98b82-6d5e-4ae6-a0af-4b7638f5fdb1/U2 gives me “ls: cannot open directory /media/fde98b82-6d5e-4ae6-a0af-4b7638f5fdb1/U2: Permission denied”). sudo before the command gives me the same output (although in the standard one they’re bold and blue whereas in the sudo they’re ordinary black text ??? ).

OK, they are being mounted then… probably a permission issue… can you send the output from:

ls -l /media/fde98b82-6d5e-4ae6-a0af-4b7638f5fdb1/U2

Also see if you can access the files when you open nautilus with root privileges:

sudo nautilus /media/fde98b82-6d5e-4ae6-a0af-4b7638f5fdb1/U2

Can you read AND write in the nautilus window that just opened ?

ls -l etc. etc. gives me

ls: cannot open directory /media/fde98b82-6d5e-4ae6-a0af-4b7638f5fdb1/U2: Permission denied

sudo the command gives me:

drwx------ 2 root root 4096 2011-05-09 18:55 Rattle And Hum
drwx------ 2 root root 4096 2011-05-09 18:55 The Joshua Tree
drwx------ 2 root root 4096 2011-05-09 18:55 The Unforgettable Fire
drwx------ 2 root root 4096 2011-05-09 18:55 Under A Blood Red Sky

sudo nautilus gives me read and write.

Sorry I meant sudo, blah blah… but it doesn’t matter :wink:

OK, we could change the ownership of the folders on the partition, and we may have to, but first can you go to System>Administration>Users and Groups … and make sure your Account type: is set to Administrator (not Custom)

Then click Manage Groups … scroll down to the “fuse” group … double-click it and make sure your username is ticked.

then click OK, Close, Close.

Now reboot, and see if you can access the USB drives as read-write now.

[EDIT]

Whilst you’re at it, make sure you are a member of the cdrom group too.

I was on custom, changed to admin, and I was already in fuse. I rebooted and the problem remains :frowning:

OK, this should do the trick

sudo chown -vR gabriel:gabriel /media/fde98b82-6d5e-4ae6-a0af-4b7638f5fdb1

and

sudo chown -vR gabriel:gabriel /media/647cc4f6-7f77-4fa1-bd04-12ce9b657c73

as long as gabriel is your username.

The above will recursively change file/folder ownership of sdb1 and sdb3 to user=gabriel and group=gabriel

brilliant (although I guess if I plug it into another linux computer the ownership will be wrong again - that said, my username is always gabriel…).

Thanks once again:)

Oddly enough, probably not… Linux doesn’t really take any notice of the user “name” as such, it sets the permissions based on the users UID (user ID) number, and GID (group ID) number.

If both systems are Ubuntu (or similar), and have a single user, the UID will most likely be 1001 for both users irrespective of user “name”, so you will be OK.
(the reason I said “both Ubuntu (or similar)” is some other distros assign a different UID for the default first user account… most use 1001 though)

If on the other hand the users have differing UID’s, then yes, you will run into permission issues, but they are easily overcome by just taking ownership.

ok, thanks :slight_smile: