Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1554995 - dnf download broken: PermissionError: [Errno 13] Permission denied: '/etc/dnf/modules.d'
Summary: dnf download broken: PermissionError: [Errno 13] Permission denied: '/etc/dnf...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Martin Hatina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1559303 (view as bug list)
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2018-03-13 18:04 UTC by Richard W.M. Jones
Modified: 2018-04-16 12:21 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1547655
Environment:
Last Closed: 2018-04-16 12:21:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2018-03-13 18:04:52 UTC
+++ This bug was initially created as a clone of Bug #1547655 +++

Cloning to Fedora since it is now also broken in F29.

This is bug in dnf.

======================================================================
ERROR: test_wildcard_with_multilib_blacklist (tests.test_gather.DNFDepsolvingTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pungi-4.1.22/tests/test_gather.py", line 850, in test_wildcard_with_multilib_blacklist
    pkg_map = self.go(packages, None, multilib_blacklist=['dummy-glibc*'])
  File "/builddir/build/BUILD/pungi-4.1.22/tests/test_gather.py", line 1723, in go
    self.dnf = self.dnf_instance(arch, lookaside=lookaside, persistdir=self.tmp_dir)
  File "/builddir/build/BUILD/pungi-4.1.22/tests/test_gather.py", line 1764, in dnf_instance
    dnf.fill_sack(load_system_repo=False, load_available_repos=True)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 437, in fill_sack
    self._setup_modules()
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 224, in _setup_modules
    self.repo_module_dict.read_all_module_confs()
  File "/usr/lib/python3.6/site-packages/dnf/module/repo_module_dict.py", line 461, in read_all_module_confs
    module_reader = ModuleReader(self.get_modules_dir())
  File "/usr/lib/python3.6/site-packages/dnf/module/repo_module_dict.py", line 480, in get_modules_dir
    ensure_dir(modules_dir)
  File "/usr/lib/python3.6/site-packages/dnf/util.py", line 124, in ensure_dir
    raise e
  File "/usr/lib/python3.6/site-packages/dnf/util.py", line 121, in ensure_dir
    os.makedirs(dname, mode=0o755)
  File "/usr/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/etc/dnf/modules.d'

--- Additional comment from Daniel Mach on 2018-02-28 03:45:16 EST ---

What needs to be fixed:
* spec to provide the directory.
* prevent creating the directory when reading modules (the problem is with non-root user here obviously)

Comment 1 Martin Hatina 2018-03-15 09:10:04 UTC
Fixed by: https://github.com/rpm-software-management/dnf/pull/1031

Comment 2 Martin Hatina 2018-03-22 09:01:41 UTC
*** Bug 1559303 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.