journalctl -b
reads:
systemd-cryptsetup[1807]: Key file /some-path/keys/sda1.luks is world-readable. This is not a good idea!
…
systemd-cryptsetup[1807]: /some-path/keys/sda1.luks has 0644 mode that is too permissive, please adjust the ownership and access mode.
but unfortunately what the correct rights should be in not given explicitly, and I'm having a hard time figuring that out.
On this blog they seem to imply that the correct rights are
chmod -v 0400 /some-path/keys/
chown root:root /some-path/keys/
could somebody please confirm, preferably with authoritative source?
This website reads
Set strict permissions (600 or 400))
but it doesn't say if it is for the folder containing the key, or for the key itself.
0700
for the directory and0600
for the file.0755
for the directory should still work as long as the file itself is protected. Ownership of both the directory and the file should beroot:root
.