Run python gpio script as another user than root
i'm trying to run python gpio script (with pyOnionGpio library) as another user than root.
There is problem with privileges on directory
I've tried change owner of that folder with
chown -R alice:alice /sys/class/gpio/and run script
sudo -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
hum the official firmware has only one user (root) and there is no sudo command. are you running a custom build of the OS?
i'm running official firmware and I install sudo
opkg install sudoand create user alice.