Mount Point Permissions
I am having a very frustrating problem with mounting.
Mounting requires a directory to exist. So I create a directory
file { '/app':
ensure => directory,
mode => '0755',
}
Now I mount the logical filesytem to the directory
mount { '/app':
ensure => mounted,
device => "/dev/${lv_attribute[vg]}/${lv_attribute[name]}",
options => defaults,
dump => $dump,
pass => $pass,
fstype => $fs_type,
}
So far so good. The problem I now have is I have a directory with permissions 755 and a mount with permissions ??? (default). Probably the umask of root. How do I set the permissions of the mount after the fact? I have already set the mode on the File so I can't call it twice. The only thing I have come up with is to have it run twice, but then the directory will match the permissions of the mount which is NOT what I want.
Has anyone encountered this yet or come up with a solution? I basically want a directory with xxx permissions and a mount on that directory with yyy permissions.
Is the mount is ever removed for whatever reason then I will have a directory with yyy permissions.
You do not you suffer from `systemd`, do you? (`ls -l /sbin/init`) If you do, have a look at `systemd.mount(5)` https://freedesktop.org/software/systemd/man/systemd.mount.html