Thursday, April 21, 2016

16.04 - USB flash drive automounts without write privilege for user


When I insert a USB external storage, it automounts to /media/usb0 and /media/usb1 (depending on if I have a usb drive already connected). When these drives are mounted, they are owned by root, so the user doesn't have write access.


When I insert the same drive into another Ubuntu machine, it mounts to /media//0A83-5E97. This is owned by , so I have write access as expected. However, I don't know how to get this behavior in my other machine (this is the behavior that I want, and I don't want to have to run chown every time I connect a usb device).


I have followed most of the suggestions on the community page (https://help.ubuntu.com/community/Mount/USB) including toggling the settings using dconf-editor (org.gnome.desktop.media-handling/automount). When auto-mount is enabled, I will often get an gui error message saying "Unable to mount 62 GB Volume, Device /dev/sdg1/ is already mounted at '/media/usb1'."


I have looked at the outputs from sudo lsblk -fm and the results are the same from the two computers (with the exception of the "mountpoints", obviously). I have also looked at the output of dmesg, but these look the same on both computers. Neither of the computers contain any mounting stuff for usb drives in /etc/fstab.


My best guess is that some other program is mounting the drive to /media/usb* before gnome mounts it to /media//, but I'm not sure how to find out what program this is. I had thought it was some xfce process, but I believe I've removed all xfce stuff on that machine.


On both machines I am using Ubuntu 16.04.



Removing usbmount fixes the problem:


sudo apt-get remove usbmount

I'm not sure when/how I installed this, but it appears to be mounting usb devices to /media/usb* before gnome does its standard mounting to /media//.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...