Sujet : Re: Simple way for web to execute root shell script.
De : Dominik.Alaszewski (at) *nospam* gazeta.pl.invalid (Dominik Ałaszewski)
Groupes : comp.os.linux.miscDate : 26. May 2025, 18:24:20
Autres entêtes
Organisation : Linux Home Computers
Message-ID : <1012843$amga$1@solani.org>
References : 1
User-Agent : slrn/1.0.3 (Linux)
Dnia 23.05.2025 The Natural Philosopher <
tnp@invalid.invalid> napisał/a:
I have a shell script that monitors hardware stuff - it needs to run as
root and be called by Apache as user www.
One can consider communicating via files. Apache writes a file
in a certain location (perhaps with the arguments for the script),
script run (as root) is then triggered via inotify mechanism (one can utilise i.e. incron),
the results are written to another file, readable by Apache.
-- Dominik Ałaszewski (pi/Debian/slrn)