[Nut-upsuser] Permissions error

Jim Klimov jimklimov+nut at gmail.com
Wed Jun 12 09:17:10 BST 2024


Normally you should elevate to run e.g. `sudo upsdrvctl ...` so the NUT
driver program initializes as `root` and drops privileges to `nut`
(tweakable as the `user=...` in ups.conf, like your RUN_AS_USER in
upsmon.conf) soon after that, and default permissions on packaged files
expect that. Alternately you can run a driver's service as that user
account right away, probably, but this is not common.

Jim

On Tue, Jun 11, 2024, 01:35 Jack McGee <jack at greendesk.net> wrote:

> https://youtu.be/vyBP7wpN72c?si=SQFhJQ7bhUAUNCIW
>
> I watched a youtube video to get this installed.
>
> I have standalone nut installation on Ubuntu 22.04.  UPS is a
> CP1500PFCLCD.  I have gotten as far as eliminating the no connection
> error that I was being broadcast.  I have the web view viewable at
> http://192.168.1.105/cgi-bin/nut/upsstats.cgi
>
>
> The problem I have I believe is permissions.
>
> mythuser at amethi:~$ upsdrvctl start
> Network UPS Tools - UPS driver controller 2.7.4
> Can't open /etc/nut/ups.conf: Can't open /etc/nut/ups.conf: Permission
> denied
>
> I ran
>
> chown root:nut upsmon.conf
>
> chmod 0640 /etc/nut/upsmon.conf
>
> mythuser at amethi:~$ sudo cat /etc/nut/upsd.users
> [monuser]
>    password = XXXX
>    admin master
>
> mythuser at amethi:~$ sudo cat /etc/nut/upsmon.conf
> RUN_AS_USER root
> MONITOR cyberpowerAmethi at localhost 1 admin secret master
>   DEADTIME 25
> SHUTDOWNCMD "/sbin/shutdown -h +0"
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20240612/e13f3791/attachment.htm>


More information about the Nut-upsuser mailing list