joan2937/pigpio

Can a C programme be used by a non root user?

Opened this issue · 1 comments

If you try then you get this:

$ ./prog
2024-10-09 20:17:12 initCheckPermitted:
+---------------------------------------------------------+
|Sorry, you don't have permission to run this program.    |
|Try running as root, e.g. precede the command with sudo. |
+---------------------------------------------------------+


Failed to initialise GPIO.
$

As far as I can tell only root can execute the programme unless you

$ sudo chown root prog
$ sudo chmod u+s prog

Yes, you need root permission.