I got a Raspberry PI and, even with the root user, I got some "permission denied" using commands like when I want to access the gpio. I tried with and without sudo. sample :
# cd /sys/class/gpio/
# ls
# sudo echo 24 > export (Permission denied)
But I can create users and add them to the sudo list. I don't understand, how can it be possible ?
Thanks to answer me.
echo
is a built-in, but there's also an executable (trywhereis echo
). However,/bin/echo foo > bar
still won't work. The problem is the output redirection (>
) which is done by your current non-sudo shell, to a file you don't have permissions on.