Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 1st January 2012, 04:41 PM
tuxor Offline
Registered User
 
Join Date: Mar 2011
Posts: 177
linuxfirefox
Change sysfs-permissions through udev-rules (tp_smapi)

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.
__________________
Fedora (Gnome) on Lenovo ThinkPad T400s
Fedora (Xfce) on IBM ThinkPad X31

Last edited by tuxor; 1st January 2012 at 11:29 AM.
Reply With Quote
Reply

Tags
change, sysfspermissions, tpsmapi, udevrules

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Udev rules mikemin Using Fedora 1 1st September 2011 04:02 PM
Udev permissions rules jazzfan Using Fedora 0 6th January 2008 04:23 PM
Help with udev rules needed leonardevens Using Fedora 9 9th December 2007 07:14 PM
udev rules - permissions problem blimbo Using Fedora 1 4th March 2006 01:39 PM


Current GMT-time: 07:18 (Tuesday, 18-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat