Bug 2143833 - nut-driver fails to start due to permission problem
Summary: nut-driver fails to start due to permission problem
Keywords:
Status: CLOSED DUPLICATE of bug 2143442
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: 37
Hardware: Unspecified
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-18 02:43 UTC by Solomon Peachy
Modified: 2022-12-03 17:34 UTC (History)
7 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2144194 0 medium CLOSED SELinux is preventing upsmon from 'create' accesses on the file upsmon.pid. 2023-04-21 02:18:48 UTC

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 ***


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