Fix the wrong permissions of root folders

Hello,

My technician replaced my old HD that had the partitions for home and opt with a new and empty HD on my minitower case.

I entered into Endeavour OS USB, and via GNOME Disks, I partitioned the new HD with two partitions - home and opt. I copied the folder gusbemacbe to the new HD. I also partitioned a empty SSD with three partitions - /boot/efi, / and Linux swap.

I started the installer, partitioned manually, and manually maintained the files on the new HD and did not format the SSD.

When I started the OS, the SDDM greeter is black. I entered in the ttype and tried to update the Plasma to fix the SDDM, I received an infor about the DBus error: “Transport endpoint is not conected”.

And I also noticed:

  Skipped: Running in chroot.
(3/8) Creating temporary files...
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/lock.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/lock.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/cache.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc/openvpn.
Detected unsafe path transition / (owned by gusbemacbe) → /etc (owned by root) during canonicalization of /etc/openvpn.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/sudo.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib/systemd.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd/netif.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd/netif.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/systemd/netif.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib/systemd.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/lib.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/cache.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log/journal.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log/journal.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log/journal.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log/journal/1a3d6824eb9e4ce9a5b8e00d4287eddf.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log/journal/1a3d6824eb9e4ce9a5b8e00d4287eddf.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log/journal/1a3d6824eb9e4ce9a5b8e00d4287eddf.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log/journal/remote.
Detected unsafe path transition / (owned by gusbemacbe) → /sys (owned by root) during canonicalization of /sys/devices/system/cpu/microcode.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev/snd/seq.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev/snd/timer.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev/loop-control.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev/net/tun.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev/fuse.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev/kvm.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev/vhost-net.
Detected unsafe path transition / (owned by gusbemacbe) → /dev (owned by root) during canonicalization of /dev/vhost-vsock.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/log/journal.
Detected unsafe path transition / (owned by gusbemacbe) → /run (owned by root) during canonicalization of /run/log/journal.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log/journal/1a3d6824eb9e4ce9a5b8e00d4287eddf/system.journal.
Detected unsafe path transition / (owned by gusbemacbe) → /var (owned by root) during canonicalization of /var/log/journal/1a3d6824eb9e4ce9a5b8e00d4287eddf/system.journal.
error: command failed to execute correctly

I tried to run the chowm -r root:root /etc /run /var, but the permissions errors still persist. I followed @fernandomaroto’s tutorial Fix /root permission necessary. But it did not work either.

I checked the folders permissions:

[root@archiso /]# ls -al / /home
/:
total 60
drwx------  17 gusbemacbe users  4096 Aug 26 21:03 .
drwx------  17 gusbemacbe users  4096 Aug 26 21:03 ..
lrwxrwxrwx   1 root       root      7 May 30 21:39 bin -> usr/bin
drwxr-xr-x   4 root       root   4096 Aug 26 21:11 boot
drwxr-xr-x  21 root       root   4280 Aug 26 22:03 dev
drwxr-xr-x  97 root       root   4096 Aug 26 22:24 etc
drwxr-xr-x   4 gusbemacbe users  4096 Aug 26 17:44 home
lrwxrwxrwx   1 root       root      7 May 30 21:39 lib -> usr/lib
lrwxrwxrwx   1 root       root      7 May 30 21:39 lib64 -> usr/lib
drwx------   2 root       root  16384 Aug 26 18:41 lost+found
drwxr-xr-x   2 root       root   4096 May 30 21:39 mnt
drwxr-xr-x   4 gusbemacbe users  4096 Aug 26 17:41 opt
dr-xr-xr-x 405 root       root      0 Aug 26 22:12 proc
drwxr-xr-x   5 root       root   4096 Aug 26 22:24 root
drwxr-xr-x  28 root       root    620 Aug 26 22:03 run
lrwxrwxrwx   1 root       root      7 May 30 21:39 sbin -> usr/bin
drwxr-xr-x   4 root       root   4096 Aug 26 21:03 srv
dr-xr-xr-x  13 root       root      0 Aug 26 22:03 sys
drwxrwxrwt   2 root       root     40 Aug 26 22:24 tmp
drwxr-xr-x   9 root       root   4096 Aug 26 22:24 usr
drwxr-xr-x  13 root       root   4096 Aug 26 21:59 var

/home:
total 28
drwxr-xr-x  4 gusbemacbe users       4096 Aug 26 17:44 .
drwx------ 17 gusbemacbe users       4096 Aug 26 21:03 ..
drwxr-xr-x 35 gusbemacbe gusbemacbe  4096 Aug 26 22:00 gusbemacbe
drwxr-xr-x  2 root       root       16384 Aug 26 17:16 lost+found
  • sudo fdisk -l:
[root@archiso /]# sudo fdisk -l /dev/sd{b,e}
Disk /dev/sdb: 447.13 GiB, 480103981056 bytes, 937703088 sectors
Disk model: ADATA SU630     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A266F895-5880-468B-AE6F-21B36315D736

Device        Start       End   Sectors   Size Type
/dev/sdb1      2048    978943    976896   477M BIOS boot
/dev/sdb2    978944  31453183  30474240  14.5G BIOS boot
/dev/sdb3  31453184 937701375 906248192 432.1G Linux filesystem


Disk /dev/sde: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD20PURZ-85A
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E7F6DD83-2EB8-4378-A431-DB0E084AB0F2

Device         Start        End    Sectors  Size Type
/dev/sde1       2048  117968895  117966848 56.3G Linux filesystem
/dev/sde2  117968896 3907028991 3789060096  1.8T Linux filesystem
  • blkid:
[root@archiso /]# sudo blkid /dev/sdb{1,2,3} /dev/sde{1,2}
/dev/sdb1: SEC_TYPE="msdos" LABEL_FATBOOT="Boot" LABEL="Boot" UUID="A1E5-8287" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="3ca1c2ac-8161-4ad9-b43e-afa326a8fe3c"
/dev/sdb2: LABEL="Swap" UUID="a56d156a-ae4a-47ad-bbae-d4e76c77a758" TYPE="swap" PARTUUID="1e0e450d-a5e7-4972-a4fd-4981d744782e"
/dev/sdb3: LABEL="Raiz" UUID="355443a0-fecd-4055-a93d-72d6de95b941" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="cf22ed74-7b8d-4f91-841c-a52c5d351385"
/dev/sde1: LABEL="Opcional" UUID="41314df0-c03f-4d70-bf9e-af1ec28d4734" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="5adcaf40-6a8d-4768-8c7d-d3dc44adfea6"
/dev/sde2: LABEL="InM-CM--cio" UUID="44bcfb8f-b718-424b-9ea9-c011a68936fd" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="3c4d36a1-268b-469c-8a1a-e023d263a85b"
  • fstab:
UUID=A1E5-8287                            /boot/efi      vfat    umask=0077 0 2
UUID=355443a0-fecd-4055-a93d-72d6de95b941 /              ext4    defaults,noatime 0 1
UUID=41314df0-c03f-4d70-bf9e-af1ec28d4734 /opt           ext4    defaults,noatime 0 2
UUID=44bcfb8f-b718-424b-9ea9-c011a68936fd /home          ext4    defaults,noatime 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

This indicates that the root directory / is not owned by root, so:

sudo chown root: /

Important: note that this is not recursive!