Netplan generates systemd-networkd config files with incorrect file permissions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Triaged
|
Medium
|
Unassigned | ||
netplan.io (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hello,
If the umask is set to 077 in /etc/profile and /etc/bash.bashrc (to comply with CIS-CAT recommendations), the files that netplan generates in /run/systemd/
$ ls -l /run/systemd/
total 4
-rw------- 1 root root 152 May 2 14:14 10-netplan-
$ sudo systemctl start systemd-networkd
Job for systemd-
See "systemctl status systemd-
$ sudo journalctl -xe --no-pager --unit=
May 02 14:39:45 ubuntu1804 systemd[1]: Starting Network Service...
-- Subject: Unit systemd-
-- Defined-By: systemd
-- Support: http://
--
-- Unit systemd-
May 02 14:39:45 ubuntu1804 systemd-
May 02 14:39:45 ubuntu1804 systemd[1]: systemd-
May 02 14:39:45 ubuntu1804 systemd[1]: systemd-
May 02 14:39:45 ubuntu1804 systemd[1]: Failed to start Network Service.
-- Subject: Unit systemd-
-- Defined-By: systemd
-- Support: http://
--
-- Unit systemd-
If I modify the permissions, it will start fine.
$ sudo chmod 0644 /run/systemd/
$ sudo systemctl start systemd-networkd
$ sudo systemctl status systemd-networkd
* systemd-
Loaded: loaded (/lib/systemd/
Active: active (running) since Wed 2018-05-02 14:43:20 UTC; 20s ago
This is on Ubuntu 18.04 with netplan.io 0.36.1, which is being executed by cloud-init 18.2-14-
Thank you,
Corey Melanson
Status changed to 'Confirmed' because the bug affects multiple users.