dracut icon indicating copy to clipboard operation
dracut copied to clipboard

Including a networkd configuration file breaks file permissions and thus systemd-networkd

Open oddlama opened this issue 3 years ago • 1 comments

Describe the bug I'm using the systemd-networkd module together --install /etc/systemd/network/20-wired.network to configure networking in the initramfs. The original file has the following permissions as recommended by systemd:

rw-r----- 1 root systemd-network 424  20-wired.network

But the initramfs includes the file with the owner & group set to root root, which prevents the file from being read by systemd-networkd in the initramfs.

Distribution used gentoo. The problem is technically distribution agnostic.

Dracut version dracut-056

Init system systemd

To Reproduce See introduction. Reproduction is trivial by including a file with the given permissions.

Expected behavior The included file should have the same owner and group as the original file, but translated to the correct owner ids within the initramfs, as the mode is also preserved. I think it also might be viable to allow specifying a new mode and/or owner explicitly on the command-line.

oddlama avatar Jul 01 '22 18:07 oddlama

This issue has already been fixed in dracut-057 by #1771

aafeijoo-suse avatar Jul 15 '22 10:07 aafeijoo-suse

Closing based on @aafeijoo-suse 's last comment

LaszloGombos avatar Oct 25 '22 13:10 LaszloGombos