[BUG] All Elemental Systemd services are marked executable (`ls -all /usr/lib/systemd/system/elemental-*-*.service`)
Describe the bug
On first boot of a single node Harvester cluster journalctl --follow shows that all elemental systemd services are marked executable and the logs say that they should not.
To Reproduce Steps to reproduce the behavior:
- Create a single-node Harvester cluster
- Shell into the instance,
rancher@ipv4:- jump in as sudo,
sudo su - watch as the node comes up for the logs
journalctl --follow
- jump in as sudo,
Expected behavior If it is not an error having an elemental systemd .service file being executable, that the logs would not show that message - if it is in error having the elemental .service systemd files being executable, then maybe they shouldn't be.
Environment
- Harvester ISO version: v1.3-head
- Underlying Infrastructure: bare-metal / qemu-kvm
Additional context Journalctl Example log:
Jun 03 17:57:38 testnode4-v13head0603 systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-initramfs.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Jun 03 17:57:38 testnode4-v13head0603 systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-reconcile.timer is marked executable. Please remove executable permission bits. Proceeding anyway.
Jun 03 17:57:38 testnode4-v13head0603 systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-reconcile.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Jun 03 17:57:38 testnode4-v13head0603 systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-network.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Jun 03 17:57:38 testnode4-v13head0603 systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-boot.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Jun 03 17:57:38 testnode4-v13head0603 systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-rootfs.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Jun 03 17:57:38 testnode4-v13head0603 systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-fs.service is marked executable. Please remove executable permission bits. Proceeding anyway.
And additionally after the node is booted fully (Harvester VIP) is accessible, sill noting:
Last login: Mon Jun 3 17:54:04 2024 from 192.168.9.163
rancher@testnode4-v13head0603:~> sudo su
testnode4-v13head0603:/home/rancher # file /usr/lib/systemd/system/elemental-setup-fs.service
/usr/lib/systemd/system/elemental-setup-fs.service: ASCII text
testnode4-v13head0603:/home/rancher # ls -all /usr/lib/systemd/system/elemental-setup-fs.service
-rwxr-xr-x. 1 root root 261 May 31 02:29 /usr/lib/systemd/system/elemental-setup-fs.service
testnode4-v13head0603:/home/rancher #
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Seeing something similar on Harvester 1.6.0-rc5 after successful install and reboot:
Aug 15 21:14:43 junglebox rancher-system-agent[65051]: time="2025-08-15T21:14:43Z" level=info msg="[d0f90e51c7fb1b289ebac4904feaed5e61bee306ad01a42b3c2d161681741ace_0:stdout]: [INFO] updating tarball contents to reflect install path"
Aug 15 21:14:43 junglebox rancher-system-agent[65051]: time="2025-08-15T21:14:43Z" level=info msg="[d0f90e51c7fb1b289ebac4904feaed5e61bee306ad01a42b3c2d161681741ace_0:stdout]: [INFO] moving systemd units to /etc/systemd/system"
Aug 15 21:14:43 junglebox rancher-system-agent[65051]: time="2025-08-15T21:14:43Z" level=info msg="[d0f90e51c7fb1b289ebac4904feaed5e61bee306ad01a42b3c2d161681741ace_0:stdout]: [INFO] install complete; you may want to run: export PATH=$PATH:/opt/rke2/bin"
Aug 15 21:14:43 junglebox systemd[1]: Reloading.
Aug 15 21:14:43 junglebox systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-initramfs.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Aug 15 21:14:43 junglebox systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-reconcile.timer is marked executable. Please remove executable permission bits. Proceeding anyway.
Aug 15 21:14:43 junglebox systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-reconcile.service is marked executable. Please remove executable permission bits. Proceeding anyway.
Aug 15 21:14:43 junglebox systemd[1]: Configuration file /usr/lib/systemd/system/elemental-setup-network.service is marked executable. Please remove executable permission bits. Proceeding anyway.
I checked the v1.5.1 and v1.6.0-rc6. It appears that these services are also executable.
reopen it for tracking
AFAIK this is largely cosmetic, but I agree we should fix it. This was fixed in elemental-toolkit (see https://github.com/rancher/elemental-toolkit/issues/1895 and https://github.com/rancher/elemental-toolkit/pull/1961) but the commit with the fix (https://github.com/rancher/elemental-toolkit/commit/ca17862e390c706beeb0fc5abd74e7e43e04fd73) only made it into elemental-toolkit v2.x, and we're still on v1.7.
We should pick up elemental-toolkit v2.x when we rebase on SL Micro 6.x, but in the meantime a quick fix might be to just add a chmod a-x /usr/lib/systemd/system/elemental*.service somewhere in our build process...