Roger Oberholtzer wrote:
I am trying to use x-systemd.automount,noauto in /etc/fstab to set up automount of disks. For the most part it works fine. I am struggling with permissions.
When the disk is, say, CIFS, I can add uid=roger to /etc/fstab and the files will belong to roger. This is because the file system itself does not have user ownership of individual files. Or at least the CISF driver makes it so.
Correct. Same is true for other filesystems that don't have such a uid/gid structure.
If I want this to work with ext4, this seems not to work as I would like.
No, because you cannot overrule the setting of an ext4 (or btrfs or....) filesystem when mounting it.
The problem is the top-level mount point. I do not seem to have any control over the permissions. So if a user inserts a disk, they cannot make any files in the top level of the disk. But that is what I need. When we were not using automount, the mount point's permissions were whatever the disk file had. They were not changed by the mount command. Autofs sets the permissions to rwx------.
This is likely *not* autofs, but the systemd implementation of automounting. Autofs leaves the TLD as it is defined on the disk. So you'd have to hunt for permission settings of the systemd automount. And/or maybe some tmpfiles magic?
We really want to use autofs. If the disks are not inserted and they are in /etc/fstab, the system will not boot. Autofs solves this nicely.
I assume you do not use kde device mounter? That one does honor fstab, too. E.g., for my sdcard reader I have /dev/mmcblk0p1 /media/sdcard auto noauto,user,shortname=lower,uid=1000 0 0 in my /etc/fstab. Clicking on the KDE device notifier 'mount' button will mount it on /media/sdcard, not the default /run/media/<user>/uuid. Though this probably doesn't help in your case. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org