[17.04] systemd-udevd. Scripts started by a rule won't write to /var/log
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Won't Fix
|
Undecided
|
Dimitri John Ledkov |
Bug Description
this is rather weird problem but after upgrading to the 17.04 the pm-powersave script I start by a udev rule stopped working. After debuggin a bit I found a place that causes the error. In the /usr/lib/
Inside of that functions I added additional logging to prove that
1. the script is started under root
2. the file /var/log/
3. the root can read from /var/log/*
4. /var permissions are 755, /var/log permissions are 775
If the script is started with 'sudo /usr/sbin/
So what could this be? Could the apparmor prevent udevd to write to /var/log ?
Temporary solution is to write to /tmp/pm-
How to reproduce:
1. add the following rule to /etc/udev/
SUBSYSTEM=
SUBSYSTEM=
2. create /usr/sbin/testudev script and make it executable
#!/usr/bin/env bash
logger "testudev: I'm: $(whoami)"
echo test >> /var/log/
3. Plug and unplug the power plug. Check the syslog:
Apr 21 13:17:06 chrome root: testudev: I'm: root
Apr 21 13:17:06 chrome systemd-
Changed in systemd (Ubuntu): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
Status changed to 'Confirmed' because the bug affects multiple users.