Udev rule for gpios for non root access
looks like it was working but needed to first manually chown gpio group to export and unexport values.

FYI the rule doesn't change the owner/permission for the directories of /sys/call/gpio  but their subdirectories yes.  

Further because of the soft links therein for device and subsystem find will report loop detected but the || true apparently suppresses that error and will continue

Also must include the action add so it will be done for each new in export.

SUBSYSTEM=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'find -L /sys/class/gpio/ -maxdepth 2 -exec chown root:gpio {} \; -exec chmod 770 {} \; || true'"

Messages In This Thread
RE: Udev rule for gpios for non root access - by dkebler - 06-11-2019, 12:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  High-speed GPIOs dsnyder 3 3,867 05-05-2016, 09:07 PM
Last Post: martinayotte
  Python GPIOs martinayotte 3 5,488 04-15-2016, 11:12 PM
Last Post: peterz

Forum Jump:

Users browsing this thread: 1 Guest(s)