Skip to content

Base.setup() cannot create /usr/lib/sysimage/libdnf5 with non-root user #1080

@gotmax23

Description

@gotmax23

As of 5.1.9 in Fedora Rawhide, libdnf5 fails to .setup() a Base object on a fresh system as a non-root user. It apparently tries to create /usr/lib/sysimage/libdnf5 which does not exist on a fresh system and which a regular user does not have permissions to create:

>>> import libdnf5
>>> base = libdnf5.base.Base()
>>> base.load_config_from_file()
>>> base.setup()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.12/site-packages/libdnf5/base.py", line 492, in setup
    return _base.Base_setup(self)
           ^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: filesystem error: cannot create directories: Permission denied [/usr/lib/sysimage/libdnf5]

Other dnf5 commands fail with the same error:

$ dnf5 makecache
filesystem error: cannot create directories: Permission denied [/usr/lib/sysimage/libdnf5]

Metadata

Metadata

Assignees

Labels

Priority: HIGHTriagedSomeone on the DNF 5 team has read the issue and determined the next steps to take

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions