| Deutsch English Français Italiano |
|
<100qol3$8so3$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: druck <news@druck.org.uk> Newsgroups: comp.os.linux.misc,comp.sys.raspberry-pi Subject: Re: Simple way for web to execute root shell script. Date: Fri, 23 May 2025 22:17:22 +0100 Organization: A noiseless patient Spider Lines: 16 Message-ID: <100qol3$8so3$1@dont-email.me> References: <100pphq$2taj$2@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 23 May 2025 23:17:24 +0200 (CEST) Injection-Info: dont-email.me; posting-host="e0070790c51e9d37c298627f8637adc9"; logging-data="291587"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MLpFOmGcDN5W1LQolpphn" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:NyjxFJ35nhr0xlqgKPmSOniuqwI= Content-Language: en-US In-Reply-To: <100pphq$2taj$2@dont-email.me> On 23/05/2025 13:26, The Natural Philosopher wrote: > I have a shell script that monitors hardware stuff - it needs to run as > root and be called by Apache as user www. It probably doesn't need to run as root, but rather the www (I suspect you mean www-data) user should be in the correct group to access the hardware. I have various Pi's running Python flask http servers or use the nginx web server and uwsgi to run Python programs. They all run as the www-data user, and the have access to cameras, i2c and 1-wire temperature sensors (groups video, i2c and gpio), and also the disk group so they can write results to sqlite databases. Nothing runs as root. ---druck