Bug 1262247 - change in behavior of dnf api - read_comps needs root privileges
change in behavior of dnf api - read_comps needs root privileges
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-09-11 05:16 EDT by Robert Kuska
Modified: 2016-07-19 13:51 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-19 13:51:35 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 Robert Kuska 2015-09-11 05:16:42 EDT
The behavior of function read_comps() from Base class was changed with the recent update of dnf-1.1.1, now read_comps(), while executing, tries to open file /var/lib/dnf/groups.json in write mode and as such fails with exception if not run under the user with proper privileges.

> $ ls -l /var/lib/dnf/groups.json                                             
-rw-r--r--. 1 root root 3228 Sep 11 10:57 /var/lib/dnf/groups.json

395         with open(self._dbfile, 'w') as db: 
396             json.dump(self.db.dct, db)

This is new in dnf-1.1.1  (when compared to dnf-1.1.0).
Comment 1 Honza Silhan 2015-09-16 07:03:12 EDT
We can execute converting of db in %postin dnf scriplet.
Comment 3 Fedora Admin XMLRPC Client 2016-07-08 05:34:02 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 13:51:35 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.

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