I’m trying to change pin mode on RPI (with Raspbian) – it works when I invoke those commands
sudo chown root.gpio /dev/gpiomem sudo chmod g+rw /dev/gpiomem
but after every restart I have to execute them because without this I have this error:
“Setting a mode to a pin requires root permissions. ---> System.UnauthorizedAccessException: Access to the path '/sys/class/gpio/gpio21/direction' is denied. ---> System.IO.IOException: Permission denied”
How can I persist those permissions?