-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LSU.2.21.1802282040110.696@Telcontar.valinor> On Wednesday, 2018-02-28 at 20:37 +0300, Andrei Borzenkov wrote:
28.02.2018 18:43, Roger Oberholtzer пишет:
On Wed, Feb 28, 2018 at 4:31 PM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
On Wed, Feb 28, 2018 at 6:23 PM, Roger Oberholtzer <roger.oberholtzer@gmail.com> wrote:
On Wed, Feb 28, 2018 at 4:08 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
Any ideas on how to sort out permissions when systemd is managing autofs? I have googled, but all seems to discuss when you set up autofs yourself. I can do that. But we are trying to make this less complicated for the people who are managing the systems.
Not related at all.
Not sure what you mean. I meant that having the user add this to the /etc/fstab entry that they want automounted when accessed makes is easier for the untrained user:
The option "uid" is simply ignored because it not possible to apply it.
x-systemd.automount,noauto
Editing a number of automount files and making parts of the mount directories is beyond their capabilities. We have bigger fish to fry with our users...
Mount the disk by your preferred method, then use chmod and chown to change the permissions normally.
The users should not be changing the permissions on files. At least not via a command they have to run. Then they could just as well mount the thing by hand and we skip the autofs thing.
Well, you have no other way.
Desktops like KDE sort this out for USB disks.
Show me how it works for you in KDE with ext4 on USB disk.
I'm not saying that it works great. But KDE at least mounts the disk as the user who is logged in.
Again, show me how KDE does it for USB disk *with ext4 on it*.
I have one stick with ext4 on it. I'm on XFCE, so I mount it with "Thunar", and look at the permissions with a terminal: cer@Telcontar:~> l /media total 12 drwxr-xr-x 3 root root 4096 Feb 28 20:03 ./ drwxr-xr-x 38 root root 4096 Feb 4 13:44 ../ drwxr-xr-x 4 cer cer 4096 Jul 25 2017 Ext4Flash/ <========== - -rw-r--r-- 1 root root 0 Jun 16 2013 not_mounted cer@Telcontar:~> I remove (both logically and physically) it and open a new full graphical session as another user, this time with Gnome. I look at the permissions: cer-g@Telcontar:~> l /media total 12 drwxr-xr-x 3 root root 4096 Feb 28 20:06 ./ drwxr-xr-x 38 root root 4096 Feb 4 13:44 ../ drwxr-xr-x 4 cer cer 4096 Jul 25 2017 Ext4Flash/ <=== - -rw-r--r-- 1 root root 0 Jun 16 2013 not_mounted cer-g@Telcontar:~> As you see, the ownership remains unaltered, it belongs to the first user. I'll try a KDE session now. [...] Well, neither KDE nor Plasma are on the list of sessions, this is strange. I'll try installing things in YaST. [...] Marking "KDE Plasma 5 Desktop". Do I need "KDE Desktop Environment"? I'll tick just in case - huh, only adds "patterns-openSUSE-kde_plasma - KDE Plasma 5 Desktop" and "patterns-openSUSE-kde - KDE Desktop Environment", but no packages. [...] Ok, now I'm in Plasma. I plug in the stick a third time, look at the permisions, and... surprise? cer-g@Telcontar:~> l /media total 12 drwxr-xr-x 3 root root 4096 Feb 28 20:28 ./ drwxr-xr-x 38 root root 4096 Feb 4 13:44 ../ drwxr-xr-x 4 cer cer 4096 Jul 25 2017 Ext4Flash/ <== - -rw-r--r-- 1 root root 0 Jun 16 2013 not_mounted cer-g@Telcontar:~> jstar /tmp/p Nope, no surprise for me, the permissions are the same. The permissions of the mount point do not change. Just in case, I look at the mount point after "safely removal": cer@Telcontar:~> l /media total 8 drwxr-xr-x 2 root root 4096 Feb 28 20:33 ./ drwxr-xr-x 38 root root 4096 Feb 4 13:44 ../ - -rw-r--r-- 1 root root 0 Jun 16 2013 not_mounted cer@Telcontar:~> The permissions of the mount point are "remembered" from the last time across different users if the filesystem is ext4 (or any Linux filesystem, but I'm not goint to test). There remains to see what are the permissions on a newly formatted stick, but I don't have one available. I might reformat this one. - -- Cheers, Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlqXBqIACgkQtTMYHG2NR9VNvQCeL8+R6hUwAZ1wvJlulbtJkI/H OWwAn20wVSQSEbP9c+eE9ButSWqX8bTN =48j9 -----END PGP SIGNATURE-----