Bug 1230355 - Running "dnf history" as non-root user produces unhelpful error message
Running "dnf history" as non-root user produces unhelpful error message
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: EasyFix, Reopened, Triaged
: 1321490 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2015-06-10 13:14 EDT by Christopher Beland
Modified: 2016-10-04 14:04 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-09-08 02:37:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christopher Beland 2015-06-10 13:14:36 EDT

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 04:35:27 EDT
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 08:43:36 EST
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 05:34:19 EDT
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 10:45:37 EDT
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

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 5 Ed Avis 2016-07-19 10:47:56 EDT
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 11:49:39 EDT
as requested above
Comment 7 Abhijeet Kasurde 2016-09-07 23:52:11 EDT
PR available on https://github.com/rpm-software-management/dnf/pull/596
Comment 8 Igor Gnatenko 2016-09-08 02:38:22 EDT
*** Bug 1321490 has been marked as a duplicate of this bug. ***

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