WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC 7.2 - /dev/input devices are in group root  (Read 4363 times)

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 81
TC 7.2 - /dev/input devices are in group root
« on: October 26, 2016, 10:58:58 AM »
is this a deliberate feature or more a bug that /dev/Input/Event[0-4], /dev/input/mouse0 and /dev/input/mice are in in group root so only the super user can read from them or shouldn't they be in group staff.

Background: I have a framebuffer application, which needs to read from /dev/input/event4
and I can start it either as root or after I've done a chown :staff /dev/input/event4

regards
--
  Bernhard

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 81
Re: TC 7.2 - /dev/input devices are in group root
« Reply #1 on: October 26, 2016, 11:48:34 AM »
it should have been /dev/input/event[0-4] instead of  /dev/Input/Event[0-4] (I have no idea how to switch off auto-capitalization).

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 720
Re: TC 7.2 - /dev/input devices are in group root
« Reply #2 on: October 26, 2016, 04:43:25 PM »
Have you tried to make a work around like symbol link ?

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 81
Re: TC 7.2 - /dev/input devices are in group root
« Reply #3 on: October 27, 2016, 04:35:34 AM »
no, but since /dev/fb0 has also root/staff as owner/group membership, I think the same would be preferable for the devices in /dev/input ...

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: TC 7.2 - /dev/input devices are in group root
« Reply #4 on: October 27, 2016, 05:39:11 AM »
I believe those are common Linux defaults, preventing users from reading each other's input. So a chown in bootsync.sh should be fine for your application.
The only barriers that can stop you are the ones you create yourself.

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 81
Re: TC 7.2 - /dev/input devices are in group root
« Reply #5 on: October 29, 2016, 06:28:11 AM »
thanks

Offline bernhard

  • Wiki Author
  • Jr. Member
  • *****
  • Posts: 81
Re: TC 7.2 - /dev/input devices are in group root
« Reply #6 on: October 31, 2016, 12:09:27 PM »
just a remark:
Raspbian puts these devices in a group named input and the default user pi ia member of that group. This looks to me very reasonable.