<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Sep 21, 2015, at 5:23 PM, John Hart <<a href="mailto:jsamcr@gmail.com" class="">jsamcr@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">After some testing, I notice that my NOTIFYCMD script seems to work if I call it as user 'john' (that's me) but if I call it as 'root' it does not work.  So is there a permissions issue ? I have permission on the file set to 755.  I see there is a variable in upsmon.conf called RUN_AS_USER.  I do not have this defined. Does this variable need to be defined ?  I presume that if it is not defined then upsmon is running as root. I saw something about 'user' and 'group' in the documentation but am a bit lost as to what I should do.  If this is the problem then explicit instructions would be helpful.<br class=""></blockquote><br class=""># By default, upsmon splits into two processes.  One stays as root and<br class=""># waits to run the SHUTDOWNCMD.  <b class="">The other one switches to another userid<br class=""># and does everything else.</b><br class="">#<br class=""># The default nonprivileged user is set at compile-time with<br class="">#       'configure --with-user=...'.  <br class=""># <br class=""><br class="">Additional discussion is in the upsmon.conf man page, or here: <a href="http://www.networkupstools.org/docs/man/upsmon.conf.html" class="">http://www.networkupstools.org/docs/man/upsmon.conf.html</a><div class=""><br class="">For Debian, the other userid is "nut".<div class=""><br class=""></div><div class="">I don't know the exact security implications of setting RUN_AS_USER to root, nor have I tried "upsmon -p" (see "man 8 upsmon" for details on that). Bear in mind that this code listens to the network, so if you do set it to run as root, I would recommend adjusting your firewall accordingly.<br class=""><br class=""><div class="">-- <br class="">Charles Lepple<br class="">clepple@gmail<br class=""><br class=""><br class=""></div><br class=""></div></div></body></html>