Menu

#13 Solution: Way of enabling non root access on FC6

open
libifp (4)
5
2006-12-20
2006-12-20
Anonymous
No

I've worked out a way to enable non-root access within udev on an FC6 system. It involves two things:

in: /etc/udev/rules.d, change the filename from 10-libifp.rules to 52-libifp.rules to occur after 50-udev.rules.

In 52-libifp.rules change the line from:
ACTION=="add", SUBSYSTEM=="usb", SYSFS{idVendor}=="4102", SYSFS{idProduct}=="100[135789]", RUN+="/sbin/libifp-hotplug"

to:

ACTION=="add", SUBSYSTEM=="usb_device", SYSFS{idVendor}=="4102", SYSFS{idProduct}=="100[135789]", OWNER="root", GROUP="ifp", MODE="0760", RUN+="/sbin/libifp-hotplug", OPTIONs="last rule"

Users wishing to access this device must become members of the the ifp unix group.

Questions? Please contact me at: peter_meyer@sympatico.ca

Discussion

  • Chris Craig

    Chris Craig - 2007-03-10

    Logged In: YES
    user_id=287023
    Originator: NO

    Alternatively create a file in /etc/udev/rules.d called ifp.rules with the following contents. As with your solution, you must be a member of the ifp group.

    --- begin file ---
    # udev rules file for supported USB devices
    #
    # To add a USB device, add a rule to the list below between the SUBSYSTEM...
    # and LABEL... lines.
    #
    # To run a script when your device is plugged in, add RUN="/path/to/script"
    # to the appropriate rule.
    #

    ACTION!="add", GOTO="libsane_rules_end"
    SUBSYSTEM!="usb_device", GOTO="libsane_rules_end"

    SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1001", MODE="660", GROUP="ifp"
    SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1003", MODE="660", GROUP="ifp"
    SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1005", MODE="660", GROUP="ifp"
    # iFP-780
    SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1007", MODE="660", GROUP="ifp"
    SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1008", MODE="660", GROUP="ifp"
    SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1009", MODE="660", GROUP="ifp"
    SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1010", MODE="660", GROUP="ifp"
    SYSFS{idVendor}=="4102", SYSFS{idProduct}=="1011", MODE="660", GROUP="ifp"

    LABEL="libsane_rules_end"
    --- end file ---

    Naturally only the lines pertaining you your particular device matter, but this is a general solution. Any other product ids would have to be added as well.

     
  • Chris Craig

    Chris Craig - 2007-03-10

    Logged In: YES
    user_id=287023
    Originator: NO

    Just a note to say that all of the 'GROUP="ifp"' lines should be at the end of the preceeding line, not on their own. Damnable line wrapping!

     

Log in to post a comment.

MongoDB Logo MongoDB