TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: A. DUMAS
from: DRUCK
date: 2018-02-03 10:49:00
subject: Re: How to enable cgi scr

On 03/02/2018 08:18, A. Dumas wrote:
> On 02/02/2018 20:51, druck wrote:
>> If you are familiar with twiddling gpio from Python, you use that for
>> both the I/O and generating HTML. To be able to run python scripts in
>> cgi-bin you need to install uwsgi.
>
> That's right, of course: if, like Python on Raspberry Pi, the language
> already has a library for gpio access then no need to call the external
> 'gpio.' I'm not sure how python-gpio permissions work nowadays, though.
> Will every user (like www-data in this case) be able to manipulate gpio
> pins from python without using sudo on the process?

No, you'll need to add the www-data user to the gpio group. If
/dev/gpiomem is owned by root:gpio you are good to go, if not there is
some information on the Raspberry Pi forums on how to set up rules in
/etc/udev/rules.d to make this so.

---druck

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.