2 users simultaneous access to udisks2 mounted drive

Ivan Lezhnjov Jr. ivan.lezhnjov.jr at gmail.com
Tue Feb 12 02:19:44 PST 2013


Hello,

I have a little problem that I'm trying to solve here.

I've got a bunch of USB drives that are automounted in GNOME with udisks2, the entire experience is automatic at this point.
It seems udisks2 (or GNOME?) mounts a drive for a specific user by creating /run/media/$username/$DRIVELABELorUUID mount point.

Like this

/dev/sdb1 on /run/media/ilj/9d244934-d9fa-4a8e-8dd7-5c595f5518cf type ext2 (rw,nosuid,nodev,relatime,uhelper=udisks2)

However, access to this mount point is strictly limited to just one user:

root at sega /home/ilj % ls -lha /run/media/
total 0
drwxr-xr-x   3 root root  60 Feb 10 19:53 .
drwxr-xr-x  24 root root 940 Feb 10 18:54 ..
drwxr-x---+  3 root root  60 Feb 12 07:41 ilj
root at sega /home/ilj % getfacl /run/media/ilj
getfacl: Removing leading '/' from absolute path names
# file: run/media/ilj
# owner: root
# group: root
user::rwx
user:ilj:r-x
group::---
mask::r-x
other::---

This is really annoying on a multiuser desktop system, because other users cannot access none of the files on these disks if some user have already them mounted.

I'd like to access this mount point by any other general system user, besides root. My understanding is that if I could change the way ACL is applied that would cut it for me.

So, I was wondering if I can change ACL that is being enforced automatically for the root directory for automounted drives with udisks2 daemon, and if yes how.
Maybe there's a better way?

Any tips? Recommendations? Known solutions?

Ivan




More information about the devkit-devel mailing list