Re: Simple way for web to execute root shell script.

Liste des GroupesRevenir à col misc 
Sujet : Re: Simple way for web to execute root shell script.
De : tnp (at) *nospam* invalid.invalid (The Natural Philosopher)
Groupes : comp.os.linux.misc
Date : 04. Jun 2025, 13:12:21
Autres entêtes
Organisation : A little, after lunch
Message-ID : <101pd75$ojp1$30@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 04/06/2025 08:18, Chris Narkiewicz wrote:
The Natural Philosopher <tnp@invalid.invalid> writes:
 
I have a shell script that monitors hardware stuff - it needs to run
as root and be called by Apache as user www.
 doas /path/to/shell.sh
or sudo.
 
In the end  setting a passwordless sudo for the www-data user for that script only, worked and was the first method to do so, so I stopped there.

Things are going to be a bit more complicated if you're in chroot.
A small C utility that wraps exec and provides suid should be ok.
 
I have done that in the past.

Another way is to call the script form cron and place the output
in some location where apache can get it.
 
I want very fast up to date response when I am on the web site and dont care when I am not, so that inclines towards a real time script.

Best regards,
Chris Narkiewicz
--
It is the folly of too many to mistake the echo of a London coffee-house for the voice of the kingdom.
Jonathan Swift

Date Sujet#  Auteur
23 May 25 * Simple way for web to execute root shell script.54The Natural Philosopher
23 May 25 +* Re: Simple way for web to execute root shell script.4Pancho
23 May 25 i+* Re: Simple way for web to execute root shell script.2Lew Pitcher
23 May 25 ii`- Re: Simple way for web to execute root shell script.1The Natural Philosopher
23 May 25 i`- Re: Simple way for web to execute root shell script.1The Natural Philosopher
23 May 25 +* Re: Simple way for web to execute root shell script.7Lew Pitcher
23 May 25 i+* Re: Simple way for web to execute root shell script.2Lew Pitcher
23 May 25 ii`- Re: Simple way for web to execute root shell script.1The Natural Philosopher
23 May 25 i`* Re: Simple way for web to execute root shell script.4The Natural Philosopher
23 May 25 i `* Re: Simple way for web to execute root shell script.3Marc Haber
23 May 25 i  +- Re: Simple way for web to execute root shell script.1The Natural Philosopher
24 May 25 i  `- Re: Simple way for web to execute root shell script.1Lawrence D'Oliveiro
23 May 25 +* Re: Simple way for web to execute root shell script.2John-Paul Stewart
23 May 25 i`- Re: Simple way for web to execute root shell script.1The Natural Philosopher
23 May 25 +- Re: Simple way for web to execute root shell script.1Eli the Bearded
23 May 25 +* Re: Simple way for web to execute root shell script.23Rich
23 May 25 i`* Re: Simple way for web to execute root shell script.22The Natural Philosopher
24 May 25 i +* Re: Simple way for web to execute root shell script.2Rich
24 May 25 i i`- Re: Simple way for web to execute root shell script.1The Natural Philosopher
24 May 25 i +- Re: Simple way for web to execute root shell script.1Theo
24 May 25 i +- Re: Simple way for web to execute root shell script.1Chris Elvidge
25 May 25 i `* Re: Simple way for web to execute root shell script.17Anssi Saari
25 May 25 i  `* Re: Simple way for web to execute root shell script.16The Natural Philosopher
25 May 25 i   +* Re: Simple way for web to execute root shell script.3Lawrence D'Oliveiro
29 May 25 i   i`* Re: Simple way for web to execute root shell script.2vallor
29 May 25 i   i `- Re: Simple way for web to execute root shell script.1The Natural Philosopher
26 May 25 i   `* Re: Simple way for web to execute root shell script.12Anssi Saari
26 May 25 i    +- Re: Simple way for web to execute root shell script.1The Natural Philosopher
27 May 25 i    `* Re: Simple way for web to execute root shell script.10druck
28 May 25 i     `* Re: Simple way for web to execute root shell script.9The Natural Philosopher
28 May 25 i      `* Re: Simple way for web to execute root shell script.8druck
29 May 25 i       +* Re: Simple way for web to execute root shell script.4Anssi Saari
29 May 25 i       i`* Re: Simple way for web to execute root shell script.3The Natural Philosopher
30 May 25 i       i `* Re: Simple way for web to execute root shell script.2Anssi Saari
30 May 25 i       i  `- Re: Simple way for web to execute root shell script.1The Natural Philosopher
29 May 25 i       `* Re: Simple way for web to execute root shell script.3The Natural Philosopher
29 May 25 i        `* Re: Simple way for web to execute root shell script.2Rich
29 May 25 i         `- Re: Simple way for web to execute root shell script.1The Natural Philosopher
23 May 25 +- Re: Simple way for web to execute root shell script.1druck
24 May 25 +- Re: Simple way for web to execute root shell script.1Lawrence D'Oliveiro
24 May 25 +* Re: Simple way for web to execute root shell script.6The Natural Philosopher
24 May 25 i+* Re: Simple way for web to execute root shell script.4Richard Kettlewell
24 May 25 ii+- Re: Simple way for web to execute root shell script.1The Natural Philosopher
24 May 25 ii`* Re: Simple way for web to execute root shell script.2Eli the Bearded
24 May 25 ii `- Re: Simple way for web to execute root shell script.1Richard Kettlewell
24 May 25 i`- Re: Simple way for web to execute root shell script.1Rich
24 May 25 +* Re: Simple way for web to execute root shell script.2Andrew Smallshaw
24 May 25 i`- Re: Simple way for web to execute root shell script.1Fritz Wuehler
26 May 25 +* Re: Simple way for web to execute root shell script.4Dominik Ałaszewski
26 May 25 i+* Re: Simple way for web to execute root shell script.2The Natural Philosopher
26 May 25 ii`- Re: Simple way for web to execute root shell script.1Lawrence D'Oliveiro
27 May 25 i`- Re: Simple way for web to execute root shell script.1c186282
4 Jun 25 `* Re: Simple way for web to execute root shell script.2Chris Narkiewicz
4 Jun 25  `- Re: Simple way for web to execute root shell script.1The Natural Philosopher

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal