NUT: No PIPEFN or LOCKFN

I just did a clean install by using the Core 201 image and discovered a problem when initiating an alert (eg by disconnecting the USB data cable).

upssched[5141]: Failed to connect to parent and failed to create parent: No such file or directory

upssched.conf looks like this:

PIPEFN /var/state/ups/upssched.pipe
LOCKFN /var/state/ups/upssched.lock

and ls -la /var/state/ups shows this:

drwxr-x--- 2 root nut  4096 May  9 09:29 .
drwxr-xr-x 4 root root 4096 Apr 21 15:14 ..
-rw-r--r-- 1 root root    5 May  9 09:29 upsd.pid
srw-rw---- 1 root root    0 May  9 09:29 usbhid-ups-eaton5px
-rw-r--r-- 1 root root    5 May  9 09:29 usbhid-ups-eaton5px.pid

I suspect there’s a problem with the directory permissions but I don’t get it.

What could I do here, please?

This did the job:

chmod 0770 /var/state/ups
drwxrwx--- 2 root   nut  4096 May  9 10:28 .
drwxr-xr-x 4 root   root 4096 Apr 21 15:14 ..
-rw-r--r-- 1 root   root    5 May  9 10:26 upsd.pid
-rw-r--r-- 1 nutmon nut     5 May  9 10:27 upssched.pid
srw-rw---- 1 root   root    0 May  9 10:26 usbhid-ups-eaton5px
-rw-r--r-- 1 root   root    5 May  9 10:26 usbhid-ups-eaton5px.pid

But, after replugging the data cable, this message keeps going:

May 9 10:31:30 fw upsmon[4975]: Poll UPS [eaton5px@localhost] failed - Data stale

It doesn’t seem to recover.