Skip to main content
11 events
when toggle format what by license comment
Mar 25, 2022 at 10:17 comment added ningelsohn The mentioned solution resulted in new problems which I can't seem to solve because there is no documentation ... I no tried to do it with the SUID bit again, but apparently it has no effect for non-binaries in unix shells.
Mar 24, 2022 at 22:06 comment added ningelsohn I actually now found a way to get the used package to work with /dev/gpiomem and I can run it without sudo. Now the problem is, that setting the led colors doesn't work like before ... if there's no solution, I will go back to using setuid and take a closer look - thank you!
Mar 24, 2022 at 21:27 comment added Kamil Maciorowski Relevant?
Mar 24, 2022 at 21:13 comment added ningelsohn I updated my question, seems like the package I am using doesn't supports /dev/gpiomem
Mar 24, 2022 at 21:13 history edited ningelsohn CC BY-SA 4.0
deleted 66 characters in body
Mar 24, 2022 at 20:57 history edited ningelsohn CC BY-SA 4.0
added 510 characters in body
Mar 24, 2022 at 20:35 comment added ningelsohn Thanks, to both of you - actually I already found the question but I didn't get it to work. I will take a closer look. And even though setting the suid bit is not recommended, I am interested what I missed. The owner is root, the executable and suid bit are set and still when I run my python gpio script I get the dev/mem permission denied error. Also tried this with a bash script and whoami -> echoes pi. Its a bit frustrating, every solution I found is either not working or not recommended...
Mar 23, 2022 at 18:49 comment added mashuptwice You should never ever set the SUID bit on a script As Daniel pointed out you can allow your normal user to access GPIO just fine.
Mar 23, 2022 at 18:45 comment added Daniel B Instead, maybe check this. Nothing says you have to have root rights. // Using the setuid bit still makes the script run as root (except scripts cannot use setuid). I suggest you read up a little on Linux and chmod and whatnot.
S Mar 23, 2022 at 18:28 review First questions
Mar 23, 2022 at 18:36
S Mar 23, 2022 at 18:28 history asked ningelsohn CC BY-SA 4.0