How do I make gnome automount USB devices with permissions so that everyone in the group can access them instead of just one user that is logged in at the time the USB storage is plugged in?
(Here the group is called
confusand the users
confusare both in that group. Only
narurwas logged in, at time of USB plug in so only
narurcan access the USB device - even after a
sudo chmod g+rw. How do I change that?)
I run a media server at my home. It is connected to a projector as only monitor. Form time to time I like to plug in a USB drive to copy stuff from the server to said drive. The drive gets auto-mounted by the usual gnome shenanigans. Obviously I don't want to turn on the projector (take a while and is not good on the lamp). So I login to the server over ssh and do the copy over terminal from another PC.
Problem is, the USB drive gets mounted under a different user than the user I log in as via ssh. My ssh user doesn't have the rights to open the mount point chosen by gnome although it is in the same group. For clarification see this terminal session:
confus@conserve:/media$ id uid=1000(confus) gid=1000(confus) groups=4(adm),8(mail),20(dialout),24(cdrom),46(plugdev),113(lpadmin),114(sambashare),122(admin),126(debian-transmission),135(debian-tor),1000(confus) confus@conserve:/media$ ll total 28 lrwxrwxrwx 1 root root 6 Mar 8 2009 cdrom -> cdrom0 drwx------ 1 narur confus 4096 Oct 8 16:53 contemplate # <-- USB drive drwxr-xr-x 2 root root 4096 May 3 2010 iso drwxr-xr-x 2 confus confus 4096 Dec 8 2009 usb1 confus@conserve:/media$ sudo chmod -R ug+rwX 4009-D44F/ # <-- Doesn't do anything [sudo] password for confus: confus@conserve:/media$ ll total 28 lrwxrwxrwx 1 root root 6 Mar 8 2009 cdrom -> cdrom0 drwx------ 1 narur confus 4096 Oct 8 16:53 contemplate # <-- No change after chmod drwxr-xr-x 2 root root 4096 May 3 2010 iso drwxr-xr-x 2 confus confus 4096 Dec 8 2009 usb1
My ssh user is "
confus" while the disk is mounted for the user "
narur". Obviously a simple
chmod doesn't do since its a mount point. The problem exists for every USB storage device.
I know I could write a udev rule and I know that device based solutions exists. But there should be an easier solution to this problem, that's native to gvfs.
Nothing has changed since 2009. This is embarrassing. There should be an easy work around for this problem at least.