1

This question already has an answer here:

I need to allow my user access to the GPIO pins and found following solution. Access GPIO pins without root. No access to /dev/mem. Try running as root!

This works perfectly. All I need to do is execute following commands to set the group and permissions for /dev/gpiomem.

sudo chown root.gpio /dev/gpiomem
sudo chmod g+rw /dev/gpiomem

After this /dev/gpiomem has following permissions.

$ ls -l /dev/gpiomem
crw-rw---- 1 root gpio 243, 0 Dec 24 13:55 /dev/gpiomem

The problem is, that the permissions are reset to following permissions after reboot.

$ ls -l /dev/gpiomem
crw------- 1 root root 243, 0 Dec 24 13:55 /dev/gpiomem

How can I make my changes on /dev/gpiomem permission permanently?

marked as duplicate by Ghanima Dec 24 '16 at 13:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Hello and welcome. I think that udev should do the trick... as goldilock's outlines in the linked answer. – Ghanima Dec 24 '16 at 13:10

Browse other questions tagged or ask your own question.