New: Systemd: Incorrect Permission on /usr/lib/systemd
https://bugs.busybox.net/show_bug.cgi?id=15847
Bug ID: 15847
Summary: Systemd: Incorrect Permission on /usr/lib/systemd
Product: buildroot
Version: 2023.08.2
Hardware: All
OS: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]Target Milestone: ---
I'm trying to use systemd as my init and systemd-networkd as my connection manager. There appears to be a problem with the file permissions that prevent networkd from starting.
CONFIG:
=======
I'm tracking origin/master and am up to date with fd41e442f0f from Nov. 7th. My defconfig is qemu_x86_64_defconfig with two modifications: BR2_INIT_SYSTEMD=y (including BR2_PACKAGE_SYSTEMD_NETWORKD=y) and a BR2_ROOTFS_OVERLAY that provides a etc/systemd/network/01.network basic DHCP unit file. (Plus the additional both required and optional linux.config modifications for systemd specified at https://github.com/systemd/systemd/blob/main/README.)
PROBLEM:
========
The systemd package creates a systemd-network user, and the systemd-networkd.service unit executes as that user. However, the file permissions prohibit this non-root user from executing /usr/lib/systemd/systemd-networkd:
# ls -ald /usr/lib/systemd/ drwxrwx--- 13 root root 2048 Nov 9 10:10 /usr/lib/systemd/
# ls -al /usr/lib/systemd/systemd-networkd -rwxr-xr-x 1 root root 1579456 Nov 9 10:10 /usr/lib/systemd/systemd-networkd
Note that the /usr/lib/systemd directory does not allow the necessary o=rx permissions for a non-root user to access these binaries.
REQUEST:
========
I'm not well versed in writing makefiles, yet. But from a sh perspective, the solution seems to be that the systemd package makefile needs to do the equivalent of:
chmod o+rx /usr/lib/systemd
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 15847] Systemd: Incorrect Permission on /usr/lib/systemd
https://bugs.busybox.net/show_bug.cgi?id=15847
--- Comment #1 from Arnout Vandecappelle <[email protected]> --- I've taken qemu_x86_64_defconfig with BR2_INIT_SYSTEMD and _NETWORKD, and I don't see the same issue:
# ls -ald /usr/lib/systemd/
drwxr-xr-x 13 root root 2048 Nov 10 19:43 /usr/lib/systemd/
# ls -al /usr/lib/systemd/systemd-networkd
-rwxr-xr-x 1 root root 1579456 Nov 10 19:43
/usr/lib/systemd/systemd-networkd
# ps -ef | grep network
84 systemd- /usr/lib/systemd/systemd-networkd
119 root grep network
# systemctl status systemd-networkd
● systemd-networkd.service - Network Configuration
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled;
preset: enabled)
Active: active (running) since Fri 2023-11-10 19:48:48 UTC; 2min 8s ago
TriggeredBy: ● systemd-networkd.socket
Docs: man:systemd-networkd.service(8)
man:org.freedesktop.network1(5)
Main PID: 84 (systemd-network)
Status: "Processing requests..."
FD Store: 0 (limit: 512)
CPU: 220ms
CGroup: /system.slice/systemd-networkd.service
└─84 /usr/lib/systemd/systemd-networkdNov 10 19:48:47 buildroot systemd[1]: Starting Network Configuration... Nov 10 19:48:47 buildroot systemd-networkd[84]: lo: Link UP Nov 10 19:48:47 buildroot systemd-networkd[84]: lo: Gained carrier Nov 10 19:48:48 buildroot systemd-networkd[84]: Enumeration completed Nov 10 19:48:48 buildroot systemd[1]: Started Network Configuration. Nov 10 19:48:49 buildroot systemd-networkd[84]: eth0: Interface name change
detected, renamed to enp0s3.
(I didn't bother changing the kernel config and I didn't add anything in /etc/systemd/network, so the network isn't actually coming up, but systemd-networkd is running.)
It seems that something went wrong in your build and /usr/lib/systemd was created with the wrong permissions?
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 15847] Systemd: Incorrect Permission on /usr/lib/systemd
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=15847
--- Comment #2 from fandingo <[email protected]> ---
Sorry for the delayed response. I've been working on my project on and off, and I've done tons of builds since posting this report. The o=rx permissions aren't getting set. I'm wondering if you have some kind of umask of ACL setting on your host OS that's makes it work for you.
I ended up doing with a device_table.txt:
# <name> <type> <mode> <uid> <gid> <major>
<minor> <start> <inc> <count>/usr/lib/systemd d 755 0 0 -
- - - -
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 15847] Systemd: Incorrect Permission on /usr/lib/systemd
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=15847
Yann E. MORIN <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |MOVED
CC| |[email protected]--- Comment #3 from Yann E. MORIN <[email protected]> --- Thank you for your report.
The issue tracker for the Buildroot project has been moved to the Gitlab.com issue tracker:
https://gitlab.com/buildroot.org/buildroot/-/issues
We are taking this opportunity to close old issues in this old tracker. If you believe your issue is still relevant, please open one in the new issue tracker.
Thank you!
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot