Bug 2148706 - nut still wants to write PID files in /var/run
Summary: nut still wants to write PID files in /var/run
Keywords:
Status: CLOSED DUPLICATE of bug 2143442
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: 37
Hardware: All
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Charles R. Anderson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-27 09:48 UTC by dominique
Modified: 2022-12-03 17:33 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-12-03 17:33:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description dominique 2022-11-27 09:48:49 UTC
Description of problem:
nut fails to start

Version-Release number of selected component (if applicable):
nut-2.8.0-4.fc37

How reproducible:
always

Steps to Reproduce:
1. systemctl start nut-monitor.service nut-server.service
2.
3.

Actual results:
nut-monitor[1903]: writepid: fopen /var/run/upsmon.pid: Permission denied
upsd[1883]: Can't connect to UPS [APC] (usbhid-ups-APC): No such file or directory
nut-monitor[1903]: Poll UPS [apc@localhost] failed - Driver not connected

Expected results:
upsd[1887]: Connected to UPS [APC]: usbhid-ups-APC

Additional info:
nut-2.8.0-4 wants to write PID files in /var/run, but don't have the permissions to do so. Building nut-2.8.0-5 (f38 actually) for f37 should solve the issue.

Comment 1 dominique 2022-11-29 09:50:18 UTC
So I installed nut-2.8.0-5 nut-client-2.8.0-5 nut-cgi-2.8.0-5 from https://kojipkgs.fedoraproject.org//packages/nut/2.8.0/5.fc35/x86_64/

I started systemd services, It didn't worked right away. My log file was cluttered with permissions issues.

I eventually found that /run/nut didn't had the rights permissions and had a spurious /run/nut/nut directory with the right permissions.

Once I had changed /run/nut with the right permissions (nut:dialout 755), I was able to start nut services without any trouble.

So, in order to make it permanent, I just had to edit /usr/lib/tpmfiles/d/nut-common.conf this way:

    State file (e.g. upsd to driver) and pidfile location for NUT:                                                                                                                                      
    d /run/nut/ 0755 nut dialout - -
    X /run/nut/

--
Dom

Comment 2 Charles R. Anderson 2022-12-03 17:33:57 UTC

*** This bug has been marked as a duplicate of bug 2143442 ***


Note You need to log in before you can comment on or make changes to this bug.