-
@pvk1 said in NUT Package (2.8.1 and above):
ls -l /var/db/nut
total 0
ls: /var/db/nut: Permission deniedAs @Gertjan noted, you need to run the commands as root.
-
@dennypage
Thx. I had disabled the admin user, so I could not login as root. The user that I login with is member of the system admins.I now enabled admin again.
s: /var/db/nut:
-rw-r--r-- 1 root nut 6 Apr 2 13:19 upsd.pid
-rw-r--r-- 1 root nut 6 Apr 2 13:19 upsmon.pid
srw-rw---- 1 root nut 0 Apr 2 13:19 usbhid-ups-ups
-rw-r--r-- 1 root nut 6 Apr 2 13:19 usbhid-ups-ups.pid -
@pvk1 Running as non-root will require that ownership of /var/db/nut, and all files therein, to be user "nut".
Note that all of the following needs to be done as root.
Suggested path:
- Remove user=root from the configuration. NB: If you have anything else in the Advanced section, please post that before continuing...
- Shut down the UPS service via command "/usr/local/etc/rc.d/nut.sh stop".
- Do "ps -axuw | grep ups" and see if any of the nut commands, such as upsmon, are still running. If they are you can stop them with "killall upsmon".
- Change ownership of /var/db/nut via command "chown -R nut /var/db/nut".
Following that, you should see permissions like so:
[23.09.1-RELEASE][root@fw]/root: ls -ld /var/db drwxr-xr-x 22 root wheel 54 Apr 2 08:29 /var/db [23.09.1-RELEASE][root@fw.cococafe.com]/root: ls -la /var/db/nut total 10 drwxr-x--- 2 nut nut 3 Apr 2 10:17 . drwxr-xr-x 22 root wheel 54 Apr 2 08:29 .. -rw-r--r-- 1 nut uucp 6 Apr 1 14:40 upsmon.pid [23.09.1-RELEASE][root@fw]/root:
You can also check permissions for /usr/local/etc/nut like so:
[23.09.1-RELEASE][root@fw]/root: ls -ld /usr/local/etc drwxr-xr-x 35 root wheel 91 Apr 2 08:45 /usr/local/etc [23.09.1-RELEASE][root@fw]/root: ls -ld /usr/local/etc/nut drwxr-xr-x 2 root wheel 24 Feb 10 12:16 /usr/local/etc/nut [23.09.1-RELEASE][root@fw]/root: ls -la /usr/local/etc/nut/*.conf -rw-r--r-- 1 root wheel 1071 Feb 7 11:02 /usr/local/etc/nut/hosts.conf -rw-r--r-- 1 root wheel 4774 Feb 7 11:02 /usr/local/etc/nut/nut.conf -rw-r----- 1 root wheel 43 Apr 1 14:29 /usr/local/etc/nut/ups.conf -rw-r----- 1 root wheel 28 Apr 1 14:29 /usr/local/etc/nut/upsd.conf -rw-r----- 1 root wheel 530 Apr 1 14:29 /usr/local/etc/nut/upsmon.conf -rw-r--r-- 1 root wheel 4217 Feb 7 11:02 /usr/local/etc/nut/upssched.conf -rw-r--r-- 1 root wheel 1871 Feb 7 11:02 /usr/local/etc/nut/upsset.conf [23.09.1-RELEASE][root@fw]/root:
Lastly, start the UPS service via command "/usr/local/etc/rc.d/nut.sh start".
-
@pvk1 said in NUT Package (2.8.1 and above):
It just occurred to me... was this attempt to start nut via /usr/local/etc/rc.d/nut.sh done as a non root user?
If so, the output makes perfect sense.
-
-
-
-
-
-
-
-
-
@dennypage I just upgraded to pfsense 24.03 with nut 2.8.2_2. Does this have the fix for this issue, or should I reapply the private? Thanks!
-
@jonlecroy said in NUT Package (2.8.1 and above):
Does this have the fix for this issue, or should I reapply the private?
What issue are you referring to?
-
@dennypage Ah sorry, this is a general thread isn't it. The UPS regular maintenance sending an 'administrative off' which triggers a pfsense immediate halt when it shouldn't.
-
@jonlecroy said in NUT Package (2.8.1 and above):
The UPS regular maintenance sending an 'administrative off' which triggers a pfsense immediate halt when it shouldn't.
I believe this is addressed, yes.
-
-
For what it's worth, I just did a pkg-static remove nut-devel and pfsense nut 2.8.2_1 blah blah. Cleaned it all out. Did a pkg-static update made sure repo is current. Installed the latest 2 packages from pfsense web gui, and tripplite USB is still broken.
pkg install -f nut-devel-2023.10.07_1.pkg
And it's fixed again.
-
@incith The next release is expected switch over to the 2.8.2 production release of NUT.