Bug 2217842 - dnf install proceeds without sudo
Summary: dnf install proceeds without sudo
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-27 08:57 UTC by Jens Petersen
Modified: 2023-08-16 08:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jens Petersen 2023-06-27 08:57:20 UTC
If I run `dnf install ...` as a user without sudo,
dnf5 goes ahead but then fails because of permissions.

Reproducible: Always

Steps to Reproduce:
$ dnf install somepkg
Actual Results:  
:
Repositories loaded.
Package                 Arch   Version                 Repository           Size
Installing:                                                                     
 dnf-repo               x86_64 0.5.4-1.fc39            copr:copr.fedor  32.7 MiB

Transaction Summary:
 Installing:        1 packages

Total size of inbound packages is 5 MiB. Need to download 5 MiB.
After this operation 33 MiB will be used (install 33 MiB, remove 0 B).
Is this ok [y/N]: y
[1/1] dnf-repo-0:0.5.4-1.fc39.x86_64    100% |   1.9 MiB/s |   5.1 MiB |  00m03s
--------------------------------------------------------------------------------
[1/1] Total                             100% |   1.9 MiB/s |   5.1 MiB |  00m03s
Verifying PGP signatures

Running transaction
Failed to open lock file "/run/dnf/rpmtransaction.lock": (13) - Permission denied

Expected Results:  
dnf should refuse to attempt install if the instantiation does not have sufficient privilege.

Is there an existing upstream ticket?

Comment 1 Fedora Release Engineering 2023-08-16 08:11:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


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