2 users simultaneous access to udisks2 mounted drive
Ivan Lezhnjov Jr.
ivan.lezhnjov.jr at gmail.com
Wed Feb 13 01:44:36 PST 2013
But it's not.
I'm talking a typical desktop computer running Linux and using USB drives that are mounted automatically when they're connected to the computer.
This is as much of typical use case as it can be.
Other users should be able to read from those drives and not write only if the files aren't owned by them or they're not in the group that can write/modify those files.
What does this strict ACL attempt to solve anyway? I'm not against it because I don't like ACL or whatever, but the problem here is that I cannot change easily enough this configuration.
Traditionally, Linux/UNIX users/admins are accustomed to managing permissions with… permissions!
Why would udisks enforce a policy of its own? And to make things worse it's neither self-evident why this ACL is required nor it is explained anywhere in the documentation.
Adding device to /etc/fstab, as Marc pointed out, works when you know what your drive is going to be named like. Be default udev assigns the names dynamically and they can change from time to time.
This approach is even more irrelevant when used in a typical desktop Linux system. A desktop user, an Ubuntu type of user, is going to just plug in their USB drive and expect the system to do the rest.
Again, I believe all that is needed to be done is make the drive available to all users in the system and let the people decide who can write and modify what by setting relevant permissions with chown and chmod.
Much more elegant and friendly.
Consider how this happens in OS X. I plugged in a USB stick (VERBATIM-8GB) and it was automatically mounted. Then I switched the user to Guest and this is what I see in filesystem:
Last login: Wed Feb 13 08:02:42 on ttys000
shiny:~ Guest$ ls -lah /Volumes/
total 18
drwxrwxrwt@ 5 root admin 170B Feb 13 08:02 .
drwxr-xr-x 30 root wheel 1.1K Dec 10 23:06 ..
lrwxr-xr-x 1 root admin 1B Jan 20 17:26 Macintosh HD -> /
drwxr-xr-x 6 root wheel 7B Feb 13 08:12 VERBATIM-8GB
drwxr-xr-x 12 1000 1000 4.0K Feb 9 14:48 seagate1TB
shiny:~ Guest$ ls -lah /Volumes/VERBATIM-8GB/
total 28
drwxr-xr-x 6 root wheel 7B Feb 13 08:12 .
drwxrwxrwt@ 5 root admin 170B Feb 13 08:02 ..
drwx------ 4 root wheel 5B Jan 20 19:53 .Spotlight-V100
d-wx-wx-wt 2 root wheel 2B Jan 20 19:53 .Trashes
drwx------ 2 root wheel 5B Jan 21 22:47 .fseventsd
drwxr-xr-x 4 1000 1000 4B Jan 21 21:33 Star.Wars.Clone.Wars
-rw-r--r--@ 1 Guest wheel 733B Feb 13 08:03 Untitled.rtf
shiny:~ Guest$ id
uid=201(Guest) gid=201(_guest) groups=201(_guest),12(everyone),61(local accounts)
I created Untitled.rtf and tried to save it to VERBATIM-8GB. As it wasn't mounted by Guest user initially and existing permissions wouldn't allow me to write, OS X asked me for admin account credentials, and once they've been supplied saved the file with ownership information of Guest user (Guest wheel).
There, this is in my opinion a sane enough way to handle this.
So, really, we just need to do away with this ACL and let users manage permissions with chown and chmod.
Ivan
On Feb 12, 2013, at 11:28 PM, Michael Biebl <mbiebl at gmail.com> wrote:
> 2013/2/12 Ivan Lezhnjov Jr. <ivan.lezhnjov.jr at gmail.com>:
>> Any tips? Recommendations? Known solutions?
>
> For such special cases, I would just add the device to /etc/fstab.
>
> Michael
>
>
> --
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?
More information about the devkit-devel
mailing list