I have a snap which request permission to /dev/gpiomem. I have connected the gpio-memory-control plug.
When i run it as a daemon service it fails to get permission.
But when i the same command as a app command on terminal with “sudo” the permission is granted.
How can i get this to work?
Interfaces do not touch existing file permissions and that device node is traditionally only root writable… if you will not simply run your app as a daemon (which makes it run as root) you could add a one-shot daemon script to your package that chmods the device node on boot (but be careful, this obviously weakens security)