Roger Oberholtzer wrote:
On Thu, Mar 1, 2018 at 3:43 PM, Peter Suetterlin <pit@astro.su.se> wrote:
Roger Oberholtzer wrote:
I have made the override file, and I see that it is being used.
:D
# /etc/systemd/system/backup.automount.d/override.conf [Automount] DirectoryMode=0777
Nonetheless, the directory has 0700 for permissions after the mount. It looks like DirectoryMode is not used.
Hmm, the manpage indeed only says that the mode is used if mountpoint directories are created. And that the default is 755. That one you do not see either. And IMHO this is because this is what the permission on the filesystem of the disk is.
I just tried this when the mount point does not exist. The mount directory is not created. It has to already exist. When I do 'cd /backup', I get this error: 'cd: /backup: No such file or directory'. Normally, 'cd /backup' causes it to be mounted.
Not sure - the manpage states Where= Takes an absolute path of a directory of the automount point. If the automount point does not exist at time that the automount point is installed, it is created. That is, you might have to reload or even re-exec systemd to get it created.
I'll bite. If you create a new partition (ext4), how do you set the permissions in the disk itself for the top directory?
By mounting it, and changing it....
That is, so the permissions of the mount point come from the disk and not the directory on which it is mounted?
I'm not able to reproduce your result with the freshly formated ext4. I always get the permissions from the FS on the disk. What is your umask when formating? I created a 2GB file, made an ext4 on it (no further options), did 'chmod 777 /mnt' and mounted it there: gate:~ # mount image /mnt gate:~ # ls -ld /mnt drwxr-xr-x 3 root root 4096 Mar 1 16:05 /mnt gate:~ # umount /mnt gate:~ # ls -ld /mnt drwxrwxrwx 1 root root 0 May 10 2017 /mnt This is a 42.3 machine.
I tried this while /backup was mounted:
cd /backup chmod 0755 .
After a remount, the permissions are what the directory on which it was mounted had. Not 0755.
Something is missing somewhere...
To me it sounds like there is a separate script somewhere that does a mount-and-chmod. Maybe check the udev rules? No, rather not, that would likely be disk specific. Does 'systemctl list-units -t mount' list anything suspicious? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org