Bug 1230355

Summary: Running "dnf history" as non-root user produces unhelpful error message
Product: [Fedora] Fedora Reporter: Christopher Beland <beland>
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 23CC: akasurde, eda, jsilhan, jzeleny, mluscon, packaging-team-maint, pnemade, tim.lauridsen, vmukhame, zbyszek
Target Milestone: ---Keywords: EasyFix, Reopened, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-08 06:37:51 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 Christopher Beland 2015-06-10 17:14:36 UTC
dnf-1.0.0-1.fc22.noarch

Yeah, so I'm always forgetting "sudo"...

[beland@localhost ~]$ dnf update
Error: This command has to be run under the root user.
[beland@localhost ~]$ dnf history 
You don't have access to the history DB.

It would be nice if "dnf history" recommended running as root, because that is almost certainly the solution.  The "you don't have access" message is a bit too vague, and especially since I'm used to the "has to be run as root" message, makes it seem like something is malfunctioning.

Comment 1 Radek Holy 2015-06-11 08:35:27 UTC
The message "This command has to be run under the root user." is produced by the "noroot" plugin. So, the "dnf history list" command should at least set the "root_user demand" so that the plugin will do its job in this case as well. And adding some suggestion to the message printed if the "noroot" plugin is missing probably cannot hurt.

Comment 2 Ed Avis 2016-01-08 13:43:36 UTC
Related: bug 1296938 requests a way to configure dnf so that non-root users do have (read only) access to the history database.

Comment 3 Fedora Admin XMLRPC Client 2016-07-08 09:34:19 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora End Of Life 2016-07-19 14:45:37 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 5 Ed Avis 2016-07-19 14:47:56 UTC
This is still an issue in Fedora 23.  Please change the version of this bug to 23 and the status to NEW.

Comment 6 Parag Nemade 2016-07-19 15:49:39 UTC
as requested above

Comment 7 Abhijeet Kasurde 2016-09-08 03:52:11 UTC
PR available on https://github.com/rpm-software-management/dnf/pull/596

Comment 8 Igor Gnatenko 2016-09-08 06:38:22 UTC
*** Bug 1321490 has been marked as a duplicate of this bug. ***