On 6/30/20 5:35 AM, Pablo Sebastián Greco wrote:
On 29/6/20 16:49, R C wrote:
Hello,
ownership/permissions on gpio device are like tis:
crw-------. 1 root root 254, 0 Jan 1 1970 gpiochip0 crw-------. 1 root root 254, 1 Jan 1 1970 gpiochip1 crw-------. 1 root root 254, 2 Jan 1 1970 gpiochip2 crw-------. 1 root root 246, 0 Jan 1 1970 gpiomem
while other device like ttys, are owned by root and "group owned" by tty, similar for video, disk, dialout etc.
wouldn't it be 'better' to have these gpio devices owned by root, "group owned" by a group other then root (gpio)?
(or did 'we' inherit that from further up/down the development chain?)
Yeap, that's inherited, I'm guessing you could write some udev rule to set the permissions you need (or even setfacl)
I didn't even go that route, I just created a group, called gpio, added myself and the uid stuff is running under to it, changed the group permission on the devices to rw . That way a user that is in the gpio group can use the devices, it's easy and similar to how serial devices etc (by being a member of dialout) work
Would be convenient if the gpio devices in /dev could be treated the same, permission wise, as modem/ACM0-n etc.
Ron
Arm-dev mailing list Arm-dev@centos.org https://lists.centos.org/mailman/listinfo/arm-dev
Pablo.