Post B1KilTKPIgn70NnCuO by dcz@fosstodon.org
(DIR) More posts by dcz@fosstodon.org
(DIR) Post #B1KilTKPIgn70NnCuO by dcz@fosstodon.org
2025-12-17T06:33:48Z
0 likes, 0 repeats
Help! #Gamepads confuse me!Root permissions:$ ll /dev/input/event17crw-rw----+ 1 root input /dev/input/event17I'm not root:$ groupsdcz dialout video wiresharkbut I can read it!$ head /dev/input/event17#7-i�▒.#7-i�▒#7-i�C/#7-i�C#SSH connection? Permission denied!What's the access mechanism here?#linux #askfedi
(DIR) Post #B1KilUQ7Ewx4ONTHRg by wolf480pl@mstdn.io
2025-12-17T08:00:56Z
0 likes, 0 repeats
@dcz> root permissionssee that little lus at the end of permission flags? ir tells you togetfacl /dev/input/event17
(DIR) Post #B1KjILw7nruDdX76e0 by dwagenk@chaos.social
2025-12-17T07:13:47Z
0 likes, 0 repeats
@natkr @dcz The funky systemd stuff is bound to seats AFAIK, so the user that is locally using the PC has access to many devices.If the`udevadm info /dev/input/event17`output lists `uaccess` in `SYSTEMD_TAGS` (or similarly named, I'm not in front of a PC to check this right now) this is allost certainly the mechanism that's allowing you as a locally logged in user to access the device.
(DIR) Post #B1KjINRMDEU0IgjYxs by wolf480pl@mstdn.io
2025-12-17T08:06:50Z
0 likes, 0 repeats
@dwagenk@natkr @dcz AFAIU the uaccess tag makes it so that logind will, through ACLs, give access to the device to the user currently logged in on the seat this device is associated with (by default seat0).If you switch TTY to one with a different user logged in, it will switch the facls. (btw you can tell ACLs are in use by the plus sign next to permission flags).
(DIR) Post #B1Kk0IglEvlOIzsoWO by wolf480pl@mstdn.io
2025-12-17T08:14:49Z
0 likes, 0 repeats
@dwagenk@natkr @dcz There is another way logind manages access to devices, which it uses for GPU (DRM control node) and most input devices (keyboard, mouse) which is that you can ask it over dbus, and it'll give you FDs, but it will revoke those FDs (special ioctl those subsystems support) when you switch TTYs