Sujet : Re: Simple way for web to execute root shell script.
De : Pancho.Jones (at) *nospam* protonmail.com (Pancho)
Groupes : comp.os.linux.misc comp.sys.raspberry-piDate : 23. May 2025, 13:51:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100pr1d$37fq$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
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>