My App needs to have write access to /dev/input/event*. On my Ubuntu system /dev/input/event* is owned by root:input. My app runs fine if I use sudo, but I'm trying to avoid that. So I set my App up to be in the 'input' group and run with setgid. But it's a cross platform App (GTK) which detects and disallows that. (It literally says the GTK has detected it's trying to run as setgid or setuid and it's not going to allow it.) But it's really the .so file that wants to write to /dev/input/event*. I'd feel a lot better if I could allow just this .so (that's in good shape and won't change often) run as root. Or if the .so file got to run as setgid then the GTK environment may not detect it. I've tried setting the special bits on the .so file, but then when I run the app it has the same permissions problem on /dev/input/event*.
Permissions are tracked per process (in fact, per thread in Linux), not per object file loaded to run the process. As such, you can’t associate different permissions with a
Another possibility would be to add
udev rules to grant permissions on the event device to your user, or perhaps whoever is at the console.