Bug 1890314
Summary: | RFE: allow unprivileged use of repomanage et. al. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Mason Loring Bliss <mbliss> |
Component: | subscription-manager | Assignee: | candlepin-bugs |
Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.2 | CC: | amatej, james.antill, jsefler, mhorky, paul, redakkan |
Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
Target Release: | 8.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | subscription-manager-1.28.20-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-11-09 19:37:35 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: |
Comment 2
Mason Loring Bliss
2020-10-21 21:15:07 UTC
Turns out this is a general issue not specific to repomanage. The error messages come from subscription-manager (therefore a possible workaround is to use --disableplugin=subscription-manager if its not needed) and they show up for any dnf command run as unprivileged (non-root) user. It is very similar to https://bugzilla.redhat.com/show_bug.cgi?id=1876841, maybe could even be considered duplicate, but like I mentioned the problem is not limited to repomanage and reposync. Reproducing the bug : ================== # subscription-manager version server type: This system is currently not registered. subscription management server: 3.2.19-1 subscription management rules: 5.41 subscription-manager: 1.28.19-1.el8 # su - test $ mkdir repo $ repomanage repo/ 2021-07-30 05:42:29,505 [ERROR] repomanage:40212:MainThread @logutil.py:221 - [Errno 13] Permission denied: '/var/log/rhsm/rhsm.log' - Further logging output will be written to stderr Not root, Subscription Management repositories not updated This system is not registered with an entitlement server. You can use subscription-manager to register. Error: No files to process Preverifying the fix on : ========================== # subscription-manager version server type: Red Hat Subscription Management subscription management server: 3.2.19-1 subscription management rules: 5.41 subscription-manager: 1.28.19-1.git.6.c1dd7c3.el8 # su - test Last login: Thu Jul 29 17:24:00 IDT 2021 on pts/0 $ mkdir repo $ repomanage repo/ Not root, Subscription Management repositories not updated This system is not registered with an entitlement server. You can use subscription-manager to register. Error: No files to process $ tail ~/.cache/rhsm/rhsm.log -n 1 2021-07-29 17:24:21,454 [ERROR] repomanage:54948:MainThread @identity.py:156 - Reload of consumer identity cert /etc/pki/consumer/cert.pem raised an exception with msg: [Errno 13] Permission denied: '/etc/pki/consumer/key.pem' ^ Notice now the error log is added to the rhsm.log entry of non-root user. Based on the observation , Pre-verifying the bug Verifying on : ============== # subscription-manager version server type: Red Hat Subscription Management subscription management server: 3.2.19-1 subscription management rules: 5.41 subscription-manager: 1.28.20-1.el8 $ mkdir repo $ repomanage repo/ Not root, Subscription Management repositories not updated Error: No files to process $ tail ~/.cache/rhsm/rhsm.log -n 1 2021-08-09 10:40:20,265 [ERROR] repomanage:17739:MainThread @identity.py:156 - Reload of consumer identity cert /etc/pki/consumer/cert.pem raised an exception with msg: [Errno 13] Permission denied: '/etc/pki/consumer/key.pem' Based on the above observation , moving the bug to Verified !! Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (subscription-manager bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4390 |