02-22-2020, 03:57 PM
(02-22-2020, 01:47 PM)rh2018 Wrote:(02-22-2020, 01:33 PM)TheOldPresbyope Wrote: /var/local/www/commandw/restart.sh is already owned by root. I thought I'd just use setuid on it and then call it with the "poweroff" argument.
Thanks Tim and Kent,
That's getting beyond my meagre Linux expertise. I'll have to stick with the script for a while.
Regards,
Richard.
Hi, Richard.
<tl;dr Standing pat is the right answer for now >
I replied to the specific issue of shutting down moOde via triggerhappy. My thought turned out to be half-baked so please ignore it until further notice.
Tim responded to the more general possibility of running the triggerhappy daemon as root rather than nobody [1]. That's a discussion best left for another thread. In a well-ordered world, thd would run under its own dedicated user account, the way mpd (user mpd), nginx (user www-data), and avahi (user avahi) do.
Regards,
Kent
[1] the special user nobody was originally an NFS construct. The InterWeb has several running flamewars concerning its use in other applications.