1

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?

5
  • The reason why you shouldn't do that is perhaps that you can get access for regular users via sudo. Aug 24, 2012 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.
    – foglerit
    Aug 24, 2012 at 18:33
  • 1
    place it in /etc/rc.local and it will perform this action automatically.
    – mnmnc
    Aug 24, 2012 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. Aug 24, 2012 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, 2012 at 21:04

1 Answer 1

1

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.

You must log in to answer this question.

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