I have somehow messed up my file and folder ownerships in `/usr`.
It started with VirtualBox complaining that `/usr` was not owned by root. I did `ls -l /usr` and saw that some folders were owned by my main user instead of root. I then sudo’d and issued `chmod -R root:root /usr`.
What happens now that I cannot even do sudo any more.
`ls -l /usr`:
dr-xr-xr-x@ - root 4 Mar 15:50 bin
drwxr-xr-x@ - root 30 Jul 2025 games
drwxr-xr-x@ - root 18 Feb 21:40 i686-w64-mingw32
drwxr-xr-x@ - root 1 Mar 07:12 include
drwxr-xr-x@ - root 30 Mar 2022 lib
dr-xr-xr-x@ - root 4 Mar 15:50 lib64
drwxr-xr-x@ - root 3 Mar 21:46 libexec
drwxr-xr-x@ - root 30 Jul 2025 local
lrwxrwxrwx@ - root 29 Apr 2025 sbin -> bin
drwxr-xr-x@ - root 4 Mar 15:50 share
drwxr-xr-x@ - root 3 Nov 2025 src
lrwxrwxrwx@ - root 30 Jul 2025 tmp -> ../var/tmp
drwxr-xr-x@ - root 18 Feb 21:40 x86_64-w64-mingw32
So evidently, there’s no owner?!
I rebooted into bash by editing the grub command line (appended `rw init=/usr/bash`, but here it appeared that the owner was set all right.
That has the side effect of removing the suid bits, which makes sudo not work anymore. Perhaps the run0 command would work, and if it does, you should try to run that with rpm -v --restore --all which should restore all meta data including owner and permissions. By the way, the sudo command should have these permissions
---s--x--x. 1 root root 211248 Nov 4 01:00 /usr/bin/sudo