Leds 'access denied' error, also with sudo


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


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


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


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