Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why are /dev/input/eventX permissions/ownership set to crw-r----- root.root? Then no unprivileged user application can program the mouse.

According to what I've read it's due to security reasons, and I understand this. Yes, I also know that I can change eventX permissions via udev. But /dev/ttyX behavior is different, when not logged in, it is:

crw------- root.root

and once logged in, it becomes:

crw------- francesc.tty

Wouldn't it make sense to do the same for the mouse (/dev/input/whatever)? It seems a design inconsistency to me.

What do you think?

share|improve this question

The mouse is a shared system hardware resource, and a tty is a local resource that a user can temporarily conjure into existence for personal use; I see no reason for the permission models to be similar)

What problem is it you are trying to solve by using the mouse device directly?

share|improve this answer
From a application design point of view I see keyboard (/dev/tty) and mouse (/dev/input/eventX) as equal citizens. I decide to use kbd as main input stream but later I change my mind and decide to use the mouse. Then I've a problem (obviously solvable) because I can open kbd but not mouse. As a matter of fact, there are well known efforts to run X without setsuid, the how come it is X supposed to open /dev/input/eventX? Does anybody know the answer? – francesc Sep 21 '11 at 10:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .