Take the 2-minute tour ×

I'm using Ubuntu 12.04 and I have /sys/kernel/debug/ with no read/execute permissions for anyone except root.

I can change that with sudo chmod +rx /sys/kernel/debug/ but the permissions are reset every time I boot the system. Is there a way to make these permission changes permanent?

Is there a good reason why I really should not do that?

share|improve this question
The reason why you shouldn't do that is perhaps that you can get access for regular users via sudo. –  AnonymousLurker Aug 24 '12 at 18:26
@AnonymousLurker that's what I'm doing with chmod, but I don't want to have to do it at every boot. –  jonnat Aug 24 '12 at 18:33
place it in /etc/rc.local and it will perform this action automatically. –  mnmnc Aug 24 '12 at 18:45
@jonnat Actually I meant you can use sudo to become root as regular user, thus getting access to that without having to change any permissions at all. –  AnonymousLurker Aug 24 '12 at 18:53
I'm not so sure you want to be changing those files but you might take a look at the chattr command. –  jmreicha Aug 24 '12 at 21:04

1 Answer 1

up vote 1 down vote accepted

Files in the /sys tree (and the /proc tree) are dynamically created by the kernel, kernel modules, device drivers and so forth and hence are not permanent across reboots.

Hence the only way to force certain permissions is by adding a local init script to reset them after each reboot.

If you are happy for all users to have read access, then I can't think of a reason you shouldn't do it.

share|improve this answer

Your Answer


