Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

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
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


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.