Bug 2143833

Summary: nut-driver fails to start due to permission problem
Product: [Fedora] Fedora Reporter: Solomon Peachy <pizza>
Component: nutAssignee: Charles R. Anderson <cra>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 37CC: cra, crow, james, mhlavink, mrsam, orion, scott
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-03 17:34:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Solomon Peachy 2022-11-18 02:43:09 UTC
Description of problem:

nut-driver appears to be trying to create pidfiles in /var/run instead of /var/run/nut:

Nov 17 21:13:32 taster.fl.shaftnet.org systemd[1]: Starting nut-driver - Network UPS Tools - device driver for NUT device 'ups2'...
Nov 17 21:13:32 taster.fl.shaftnet.org systemd-tmpfiles[10043]: Failed to open '/usr/lib/tmpfiles.d/nut-client.conf': No such file or directory
Nov 17 21:13:33 taster.fl.shaftnet.org nut-driver@ups2[10073]: writepid: fopen /var/run/usbhid-ups-ups2.pid: Permission denied
Nov 17 21:13:33 taster.fl.shaftnet.org nut-driver@ups2[10073]: Using subdriver: CyberPower HID 0.6
Nov 17 21:13:33 taster.fl.shaftnet.org nut-driver@ups2[10073]: Network UPS Tools - Generic HID driver 0.47 (2.8.0)

Version-Release number of selected component (if applicable):

nut-2.8.0-4.fc37.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Enable nut-driver-enumerator
2. watch driver fail in the logs


If you make nut-driver run as root (in the ups config) it will work, but clearly this is not what was intended.

Comment 1 Solomon Peachy 2022-11-20 13:39:54 UTC
if you run it as root with selinux enabled, it trips over the policy.  So it's doubly b0rked.

Comment 2 Sam Varshavchik 2022-11-21 12:54:27 UTC
Same problem here.

Comment 3 Charles R. Anderson 2022-12-03 17:34:14 UTC

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