We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

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 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


  • administrators

    @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 sudo opkg install sudo and create user alice.



Looks like your connection to Community was lost, please wait while we try to reconnect.