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?
udev
should do the trick... as goldilock's outlines in the linked answer. – Ghanima Dec 24 '16 at 13:10