On Wed, 28 Feb 2018 16:01:08 +0100, 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.
If I want this to work with ext4, this seems not to work as I would like.
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------.
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.
This is not an answer to the question, but in /etc/fstab you can add noauto option to mount options. In this case the system will boot even if the drives are not present. You can mount the drives then manually. I have lines like this in my fstab: /dev/md6 /mnt/p6 ext3 noauto,users,defaults 1 2 Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org