I accidentally sudo chmod 666 /dev/*
. And now many devices in my computer messed up. I have fixed some of them like /dev/shm
, /dev/snd
but I am not sure about the rest. What's the correct permission for file and folder in /dev/*
? Can I restore it to the default value ?
Asked
Active
Viewed 285 times
0

iKid
- 165
- 5
-
Are you using udev? – Ignacio Vazquez-Abrams Jan 17 '13 at 16:55
-
No I'm not using it, I'm in ubuntu 12.04 – iKid Jan 17 '13 at 16:57
-
1So you stripped udev out of your system? – Ignacio Vazquez-Abrams Jan 17 '13 at 16:58
-
I guess it's there :) I just do not know about it – iKid Jan 18 '13 at 11:57
1 Answers
2
In modern Linux systems, the /dev/
filesystem gets rebuilt at every boot by udev. If you can afford to reboot, you'd best just do that rather than spend the time required to clean up the mess and run the risk of missing something important (which could very well cause a security issue).
If you still want to do it manually, you will find all of the udev rules that specify the permissions that things are supposed to have in /lib/udev/rules.d
and /etc/udev/rules.d
. Beware, there are lots!
You might be able to get udev
to rerun its rules automatically and fix everything up with the following command:
/sbin/udevadm trigger --action=add
...but I have not tried this and I have no idea whether it will actually work or if it will cause problems.

Celada
- 6,200
- 1
- 21
- 17