Run python gpio script as another user than root
-
Hi,
i'm trying to run python gpio script (with pyOnionGpio library) as another user than root.
There is problem with privileges on directory/sys/class/gpio
.I've tried change owner of that folder with
chown -R alice:alice /sys/class/gpio/
and run scriptsudo -u alice ./script.py
Script throw exception IOError: [Errno 13] Permission denied: '/sys/class/gpio/gpio18/direction'. New created link /sys/class/gpio/gpio18/ is created by root.
Do you now some way how to run python gpio script as another user than root?
Thank you, Radim
-
@Radim-Vesely
hum the official firmware has only one user (root) and there is no sudo command. are you running a custom build of the OS?
-
Hi,
i'm running official firmware and I install sudoopkg install sudo
and create user alice.