Bug 1365904
| Summary: | /var/run/nut/ not created by upsd | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | David Howells <dhowells> |
| Component: | nut | Assignee: | Michal Hlavinka <mhlavink> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 24 | CC: | mhlavink |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | nut-2.7.4-3.fc24 nut-2.7.4-4.fc25 nut-2.7.4-3.fc23 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-09-23 16:25:48 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
David Howells
2016-08-10 12:54:28 UTC
Manually creating /var/run/nut with mkdir allows the service to start, but this is a temporary fix as /var/run is on tmpfs, also:
upsd[16208]: /var/run/nut is world readable
upsd[16208]: /var/run/nut is world readable
The nut driver (blazer_usb) then fails due to SELinux:
python3[16218]: SELinux is preventing blazer_usb from getattr access on the file /run/udev/data/c189:1.
***** Plugin catchall (100. confidence) suggests **************************
If you believe that blazer_usb should be allowed getattr access on the c189:1 file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'blazer_usb' --raw | audit2allow -M my-blazerusb
# semodule -X 300 -i my-blazerusb.pp
setroubleshoot[16218]: SELinux is preventing blazer_usb from getattr access on the file /run/udev/data/c189:1. For complete SELinux messages. run sealert -l b9e86179-d55c-43d3-8f73-251a55f7c2ae
upsd[16208]: Can't connect to UPS [dsl_ups] (blazer_usb-dsl_ups): No such file or directory
upsd[16208]: Can't connect to UPS [dsl_ups] (blazer_usb-dsl_ups): No such file or directory
Note that even after I manually create the directory, I still see this: upsd[16674]: fopen /var/run/nut/upsd.pid: No such file or directory and nothing appears in the dir. Is this a holdover from pre-systemd days? Further, the blazer_usb driver program can't open the USB device files because it sets its uid & gid to 57 (nut), but the USB device files are owned by root.root and don't grant write permission to other. If blazer_usb is run by hand with "-a dsl_usb -u root", then it works. > upsd[16208]: /var/run/nut is world readable /var/run/nut should be created by systemd-tmpfiles and it should have 0750 permissions there was missing ExecStartPre in nut-driver.service so this issue should be fixed The usb devices nut is interested in have dialout group set, nut is member of that group (see output of "id nut"). It seems that it's more likely selinux issue Selinux issue is tracked in bug #1339437 nut-2.7.4-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1c864f40a5 nut-2.7.4-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0d2525e306 nut-2.7.4-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8f17c643d3 nut-2.7.4-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8f17c643d3 nut-2.7.4-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1c864f40a5 nut-2.7.4-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0d2525e306 nut-2.7.4-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8c02066db5 nut-2.7.4-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8c02066db5 nut-2.7.4-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report. nut-2.7.4-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report. nut-2.7.4-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. |