Issue with login as regular user

Ok, I have regular user being part of wheel and able to sudo commands
but now this:

> sudo dnf install rpmfusion-free-release
> Downloading Packages:
***> rpmfusion-free-release-8-0.1.noarch.rpm 79 kB/s | 9.7 kB 00:00 ***
> ----------------------------------------------------------------------------------------------
***> Total 20 kB/s | 9.7 kB 00:00 ***
> [Errno 13] Permission denied: '/bin/rpmkeys’

Or should I use YUM for this?

yum is dnf. Same program, two names.

Try sudo rpm --restore -a
(Haven’t used it, but it should reset permissions, uids, and caps of files back to what they should be according to the packages they came from.)

What are the permissions of /bin/rpmkeys ?

$ sudo rpm --restore -a
exec failed

root read and write
root group read only
others read only

you see why it can not work? no execution permissions. I would like to see the output of ls -l /bin/ to see if another permissions are mangled too, but maybe it’s a little too much for this thread, I don’t know.

ls -l /bin/

its all root and root
except one item root tty

OK, same permission problem with /bin/rpm ?

rpm has the same permissions as rpmkeys

$ ls -l /bin/
total 290296
-rwxr-xr-x. 1 root root 54992 Oct 21 03:28 ‘[’
lrwxrwxrwx. 1 root root 6 Apr 12 2021 a2x → a2x.py
-rwxr-xr-x. 1 root root 37017 Apr 12 2021 a2x.py
-rwxr-xr-x. 1 root root 30472 Apr 12 2021 ac

should I

chmod -R 755 /bin

as root?

The permissions from this output looks ok. not as you described the permissions of rpm or rpmkeys.

Fix the permissions manually.

# chmod +x /bin/rpm
# chmod +x /bin/rpmkeys

then you could try the command from jlehtone
btw. you can manually find files with no execution bit set with

$ find /bin/ -not -perm /111

maybe you want to get this list first (instead of ls -l /bin/)

Isn’t /bin just a symlink to /usr/bin? I’d rather fix in the latter.

[Errno 13] Permission denied: ‘/bin/rpmkeys’
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing ‘dnf clean packages’.
$ ls -l /bin/rpm
-rwxr-xr-x. 1 root root 21304 Nov 9 15:34 /bin/rpm
$ ls -l /bin/rpmkeys
-rwxr-xr-x. 1 root root 17232 Nov 9 15:34 /bin/rpmkeys

$ sudo chmod +x /bin/rpm
]$ sudo rpm --restore -a
exec failed

$ find /bin/ -not -perm /111
/bin/clevis-luks-common-functions
$ ls -l /bin/clevis-luks-common-functions
-rw-r–r–. 1 root root 31709 Oct 28 2020 /bin/clevis-luks-common-functions

$sudo chmod +x /usr/bin/rpm
$ sudo chmod +x /usr/bin/rpmkeys
$ sudo rpm --restore -a
exec failed

It doesn’t matter, does it?

This one is ok. your permissions seem OK.

But I still get
[Errno 13] Permission denied: ‘/bin/rpmkeys’
from
$ sudo dnf install rpmfusion-free-release
and
$ sudo dnf install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
regardless

Yes, but not because the file permissions. I don’t know what’s going on.
Some ideas for next steps:

check the permissions of directories /usr/bin and /usr
look for selinux AVCs
try without sudo but with root
maybe try without the non default polyinstantiation, turn it off again.
try other rpm commands like $ rpm -qa … does this fail too?
check for errors in the log, e.g.:

# journalctl -p err

Thanks, I’ll try next year