On Jun 18, 2014, at 1:51 PM, Mike. <[email protected]> wrote: > The upsmon.conf has the option of setting RUN_AS_USER username > > Might it be possible to add a similar option to the upsd.conf file? > > I see the -u command-line option for both upsmon and upsd, however, > upsd doesn't seem to carry that to the configuration file, as upsmon > does.
I'll admit this does seem arbitrary, but based on a quick look at the upsd source code, the userid is looked up before the configuration file is read, and there is a chroot() in between those statements. So this will require some more investigation to see what assumptions are being made about the userid when the configuration file is processed. I hadn't noticed this until now, since most distributions tend to have a way to pass in options to their daemons (such as /etc/nut/nut.conf on Debian/Ubuntu). What we may want to do is add some comments to nut.conf for passing "-u user" in UPSD_OPTIONS. (It's in the man page for nut.conf, though.) -- Charles Lepple clepple@gmail _______________________________________________ Nut-upsuser mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

