USB Pen gets connected as ROOT, no user permitions

Bug #270860 reported by Fernando Miguel
6
Affects Status Importance Assigned to Milestone
gnome-mount (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: gvfs

When I connect any USB flash pen to my laptop, it gets mounted with root permissions, and the user cant write, or delete anything on it.
If I unmount it, and mount it with -o uid=1000 it works as expected!

GVFS Version: 0.99.7.1-0ubuntu1
uname -a Linux 2.6.27-1-generic #1 SMP Sat Aug 23 23:19:01 UTC 2008 x86_64 GNU/Linux

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report, what filesystem is being used on the device?

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

My current Pen is FAT32. the one I found the bug last weekend I dont know but i think it was FAT32 too

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

Sep 16 13:30:28 blubug kernel: [20337.218281] usb 4-1: new full speed USB device using uhci_hcd and address 3
Sep 16 13:30:28 blubug kernel: [20337.448350] usb 4-1: configuration #1 chosen from 1 choice
Sep 16 13:30:28 blubug kernel: [20337.454176] scsi7 : SCSI emulation for USB Mass Storage devices
Sep 16 13:30:28 blubug kernel: [20337.454176] usb-storage: device found at 3
Sep 16 13:30:28 blubug kernel: [20337.454176] usb-storage: waiting for device to settle before scanning
Sep 16 13:30:33 blubug kernel: [20342.456806] usb-storage: device scan complete
Sep 16 13:30:33 blubug kernel: [20342.459655] scsi 7:0:0:0: Direct-Access LEXAR JUMPDRIVE 1.01 PQ: 0 ANSI: 1 CCS
Sep 16 13:30:33 blubug kernel: [20342.492031] sd 7:0:0:0: [sdb] 251904 512-byte hardware sectors (129 MB)
Sep 16 13:30:33 blubug kernel: [20342.496471] sd 7:0:0:0: [sdb] Write Protect is off
Sep 16 13:30:33 blubug kernel: [20342.496933] sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
Sep 16 13:30:33 blubug kernel: [20342.497005] sd 7:0:0:0: [sdb] Assuming drive cache: write through
Sep 16 13:30:33 blubug kernel: [20342.509984] sd 7:0:0:0: [sdb] 251904 512-byte hardware sectors (129 MB)
Sep 16 13:30:33 blubug kernel: [20342.514764] sd 7:0:0:0: [sdb] Write Protect is off
Sep 16 13:30:33 blubug kernel: [20342.514764] sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
Sep 16 13:30:33 blubug kernel: [20342.514764] sd 7:0:0:0: [sdb] Assuming drive cache: write through
Sep 16 13:30:33 blubug kernel: [20342.514764] sdb: sdb1
Sep 16 13:30:33 blubug kernel: [20342.521978] sd 7:0:0:0: [sdb] Attached SCSI removable disk
Sep 16 13:30:33 blubug kernel: [20342.521978] sd 7:0:0:0: Attached scsi generic sg2 type 0
Sep 16 13:30:35 blubug hald: mounted /dev/sdb1 on behalf of uid 1000

$ mount
/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
lrm on /lib/modules/2.6.27-1-generic/volatile type tmpfs (rw,mode=755)
/dev/sda5 on /home type xfs (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/bugabundo/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=bugabundo)
/dev/sdb1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal)

it is quite strange to see the log mentioning the "mounted /dev/sdb1 on behalf of uid 1000" when i cant write to it.

Revision history for this message
YoBoY (yoboy-leguesh) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Revision history for this message
Martin Pitt (pitti) wrote :

Is /dev/sdb1 in /etc/fstab by chance? (It shouldn't be). If not, can you please give me the output of

  cat /media/.hal-mtab

Also, please try to unmount the pen, and then give me the output of

  gnome-mount -vbd /dev/sdb1
  mount

thanks!

Changed in gnome-mount (Ubuntu):
assignee: nobody → pitti
status: New → Incomplete
Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

I Martin, thanks for looking at this.

This is quite an old bug, and i no longer run interpid

currently i cant reproduce it (on jaunty), but i do remember seeing this happen to me and a lot more users on hardy and ibex.

Not sure exactly what to do next with this bug. I'll leave it to you.

Changed in gnome-mount (Ubuntu):
status: Incomplete → New
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for the feedback. I close this for now. Please respond here if you still have problems with this, then I'll reopen it.

Changed in gnome-mount (Ubuntu):
status: New → Fix Released
Revision history for this message
Jaap Versteegh (j-r-versteegh) wrote :

I had this issue because I accidentally installed package "usbmount". Devices get mounted /media/usb<n> in that case and are owned by root.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.