Leds 'access denied' error, also with sudo

#1

Under Raspbian I get “access denied” (also using sudo) trying to access /sys/class/leds/pca963x:$COLOR device… What I’m doing wrong?

echo “255” >/sys/class/leds/pca963x:red/brigtness

#3

I believe it’s because the shell interprets and handles redirection before the command is executed. So the redirection (>/sys/class/leds/pca963x:red/brigtness) is attempted with the user’s permissions, thus fails. Can you please try with sudo sh -c "echo 255 > /sys/class/leds/pca963x:red/brightness" ?

#5

Oh right!! … OMG I’m very stupid after post I got the problem … thanks !

#6

Glad that you found it! Do not hesitate to contact us if you encounter any other issue.