Closed dbrgn closed 3 years ago
Can be fixed by changing the following in /etc/udev/rules.d/92-gpio.rules
(just add GROUP="gpio"
):
-SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'"
-SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'"
+SUBSYSTEM=="gpio", KERNEL=="gpiochip*", GROUP="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'"
+SUBSYSTEM=="gpio", KERNEL=="gpio*", GROUP="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chown volumio:volumio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'"
Not sure current build uses latest of raspberrypi-sys-mods
as that package is cached in own @volumio repo.
You may check if latest rule fixes your issue.
I believe http://archive.volumio.org/debian/ is just a mirror of archive.raspberrypi.org -- so packages are the same. :-)
$ curl -s http://archive.raspberrypi.org/debian/dists/jessie/main/binary-armhf/Packages | grep 'Package: raspberrypi-sys-mods' -B 2
Package: raspberrypi-sys-mods
Version: 20170519
$ curl -s http://archive.volumio.org/debian/dists/jessie/main/binary-armhf/Packages | grep 'Package: raspberrypi-sys-mods' -B 2
Package: raspberrypi-sys-mods
Version: 20170519
(I hope this is the proper repository for reporting this issue.)
As
volumio
user, I cannot access/dev/gpiochip0
, even though I'm in thegpio
group.According to the library I'm using, this should work:
Of course I can fix this myself, but it would be nice if the image would support these permissions out of the box :slightly_smiling_face: