Happy new year!
On my ThinkPad T400s (Fedora x86_64), I'm using the module tp_smapi (more info:
http://www.thinkwiki.org/wiki/Tp_smapi) to modify certain parameters that can't be accessed through /proc/acpi/battery - for example: /sys/devices/platform/smapi/BAT0/start_charge_thresh.
Now these sysfs-device-parameters can't be changed by non-root-users. But I want users of the group wheel to be allowed to directly modify values in /sys/devices/platform/smapi/BAT0/ (those files are usually owned by root:root and have mode 644).
I tried creating a udev-rules-file /etc/udev/rules.d/30-smapi.rules:
Code:
DRIVER=="smapi", GROUP="wheel", MODE="664"
Unfortunately, this doesn't have any effect at all. So what's wrong with this rule?
---
More info about the smapi-sysfs-device:
Code:
$ udevadm info -a -p /sys/devices/platform/smapi/
looking at device '/devices/platform/smapi':
KERNEL=="smapi"
SUBSYSTEM=="platform"
DRIVER=="smapi"
ATTR{ac_connected}=="0"
---------- Post added at 05:41 PM ---------- Previous post was at 12:24 PM ----------
What worked out well is the following udev-rule.
Code:
DRIVER=="smapi", RUN+="/bin/find /sys/devices/platform/smapi/ -name *_charge_thresh -execdir /bin/chmod 664 {} ; -execdir /bin/chown root:wheel {} ;"
It's not exactly elegant, but it suffices and thus I'm gonna mark this thread as solved.