Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I have developed a brightness indicator for unity in python. I change the brightness using the following system call:

echo 4 > /sys/class/backlight/acpi_video0/brightness  [value = 0 to 9]

Problem is this command needs root access. Because of brightness file's permission:

-rw-r--r-- 1 root root 4096 2012-04-23 17:36 /sys/class/backlight/acpi_video0/brightness

So i just change the file's permission to 775. It worked. But after reboot the file's permission change again. Now it can not be done because permission denied. How can i do this without root permission?

thanks in advance

share|improve this question
up vote 1 down vote accepted

One thing you can do is change the permissions in some sort of startup script, such as /etc/rc.local.

share|improve this answer
It's a way but looking for better solution. thanks for reply – shantanu Apr 30 '12 at 19:41
this answer has a sample rc.local script:… – ImaginaryRobots Apr 30 '12 at 20:17
Pretty sure sysfs stuff's permissions are not persistent so there's not really any better way to do it. – Ibrahim Jul 13 '12 at 22:45

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.