bash: /sys/class/gpio/export: Permission denied

Post Reply
Colin
Posts: 51
Joined: Mon Mar 06, 2017 2:33 am
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

bash: /sys/class/gpio/export: Permission denied

Post by Colin »

I have restored a working image. But now when I use sudo echo 239 > /sys/class/gpio/export I have the error “-bash: /sys/class/gpio/export: Permission denied”

How can I solve this?

rpcameron
Posts: 278
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: bash: /sys/class/gpio/export: Permission denied

Post by rpcameron »

Colin wrote:I have restored a working image. But now when I use sudo echo 239 > /sys/class/gpio/export I have the error “-bash: /sys/class/gpio/export: Permission denied”

How can I solve this?
It's because you are accessing the /sys filesystem as a regular user. Try this instead:

Code: Select all

$ echo 239 | sudo tee /sys/class/gpio/export

Colin
Posts: 51
Joined: Mon Mar 06, 2017 2:33 am
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: bash: /sys/class/gpio/export: Permission denied

Post by Colin »

Thanks it works!

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests