Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertCNelson/102ed59dc57ba8faa9f07285c874ebb9 to your computer and use it in GitHub Desktop.
Save RobertCNelson/102ed59dc57ba8faa9f07285c874ebb9 to your computer and use it in GitHub Desktop.
# /etc/udev/rules.d/80-gpio-noroot.rules
#
# ReWritten by: Matthijs van Duin
# Corrects sys GPIO permissions on the BB so non-root users in the gpio group can manipulate bits
#
SUBSYSTEM=="gpio", ACTION=="add", \
RUN+="/bin/chgrp -R gpio '/sys%p'", \
RUN+="/bin/chmod -R g=u '/sys%p'"
SUBSYSTEM=="subsystem", KERNEL=="gpio", ACTION=="add", \
RUN+="/bin/chgrp gpio '/sys/class/gpio/export' '/sys/class/gpio/unexport'", \
RUN+="/bin/chmod g=u '/sys/class/gpio/export' '/sys/class/gpio/unexport'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment