WebThingsIO / gpio-adapter

GPIO adapter add-on for WebThings Gateway
Mozilla Public License 2.0
5 stars 12 forks source link

No Permission in docker container #40

Closed Chipandcharge closed 4 years ago

Chipandcharge commented 4 years ago

Hi all,

although I followed the instructions to run the container in priovileged with privileged: true in my docker-compose.yml file and my user is added to the gpio group as well, the adapter has no permission to /sys/class/gpio/export

ERROR: gpio-adapter: Failed to start add-on gpio-adapter: No permissions to /sys/class/gpio/export

Where is the missing link? I also tried mounting the /sys direcctory. No succes either.

mrstegeman commented 4 years ago

Can you use docker exec -it container-name /bin/bash and run ls -lh /sys/class/gpio/export to check if the nodes are there, and what their permissions are?

mrstegeman commented 4 years ago

Also, please make sure you have the latest Docker image.

Chipandcharge commented 4 years ago

-rwxrwx--- 1 root gpio 4.0K Apr 29 20:13 /sys/class/gpio/export This is the output I got. Where is the permission hidden?

mrstegeman commented 4 years ago

That looks fine to me... Did you ensure you have the latest image?

Chipandcharge commented 4 years ago

I just deleted the image and redownloaded it. Thanks. it was the 2 weeks old image. Are the permissions root and gpio for the folder?

mrstegeman commented 4 years ago

Yes, that’s what it should be.

mrstegeman commented 4 years ago

See thread here: https://discourse.mozilla.org/t/docker-access-to-raspberry-pi4-gpio-pins/58872