Bug 1230355 - Running "dnf history" as non-root user produces unhelpful error message
Summary: Running "dnf history" as non-root user produces unhelpful error message
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1321490 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-10 17:14 UTC by Christopher Beland
Modified: 2016-10-04 18:04 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-08 06:37:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


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