Deutsch   English   Français   Italiano  
<100pr1d$37fq$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Pancho <Pancho.Jones@protonmail.com>
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 13:51:57 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <100pr1d$37fq$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: 8bit
Injection-Date: Fri, 23 May 2025 14:51:58 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4f5f7b7689472a26c691fb0fb9967b17";
	logging-data="105978"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19fVOCU5ofiBOmyXwGZR5km+Mzhy5Dh3w8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:+6WxfB6XB9RGuZNV43V/Zl9Df7I=
In-Reply-To: <100pphq$2taj$2@dont-email.me>
Content-Language: en-GB
Bytes: 1674

On 5/23/25 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.
> 
>   Bookworm linux on a Pi4.
> 
> Its all inside a domestic firewall so security is not a huge issue.
> What is the quickest and simplest solution to this?
> 
> 

Dunno, change script ownership to root and use setuid, sudo chmod u+s. 
It used to work, nowadays who knows? It did used to provide security holes.

<https://askubuntu.com/questions/1391359/how-to-let-a-non-privelegde-user-run-a-program-requiring-root-permsiossions-wit>