-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2018-03-02 at 07:53 +0100, Roger Oberholtzer wrote:
I really appreciate all the discussion. I can summarize.
The task:
- I want to automount a SATA disk in a hot swap removable drive bay.
- The disk can be any format: ext4, vfat, ntfs
- I would prefer to use the systemd automount facility where I place the needed information in /etc/hosts.
- The actions are to be performed by a normal user without root permissions. The disk should be mounted as the result of something like: cd /backup
- The user who mounted the disk should have write access to the top level directory. This is non-negotiable. Without this, the user needs root permissions to change the top level directory permissions.
It is simply impossible, except on vfat, ntfs, or exfat. This is non-negotiable. :-) In ext4, xfs, btrfs, etc, the permissions of the base directory are changed only by root with standard chmod/chown tools on the *mounted* filesystem. It is possible, though, that there is a formating tool, which runs as root, that changes the permissions to be accessible to the user that runs the desktop at that time who called the format tool using some su/sudo variant.
What does work:
- systemd arranges for the disk to be automounted.
- When the user access the disk mount point, the disk is mounted.
- It is working for all file system types.
The problem:
- The directory on which the disk is mounted is not always writable by the user who initiated the mount.
As documented.
- Adding a DirectoryMode= to a systemd override file (it cannot be set in /etc/fstab) gets the option added to the automount unit file for this file system. However, the mount directory does not have these permissions when the disk is automounted.
Of course not.
Status:
I have been testing with ext4. It was said that if I mount the file system, change the permissions of the mount point (i.e., the top level directory), these permissions would be used on subsequent mounts. I do not see that this is happening. The file system top level permissions are not what I expect.
We can not reproduce this. - -- Cheers, Carlos E. R. (from openSUSE 42.3 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlqZPnUACgkQtTMYHG2NR9X4hQCfWyWy1ZtoqxhuuaopUBR0P4mN tcAAnA+zdatvjt9uje+6b+d4976VFHtL =/yub -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org