elementary / files

File browser designed for elementary OS
https://elementary.io
GNU General Public License v3.0
322 stars 75 forks source link

Files in administrator mode not showing other drive partitions #2134

Open sajidsadeem opened 1 year ago

sajidsadeem commented 1 year ago

What Happened?

Files in Administrator Mode (with root privileges to regular user and as Root user both) is not showing other drive partitions, it does show Home partition and Root partition, but no other partition. Opening Files in normal user mode shows those partitions without any issue.

I am on Elementary OS 7 Horus, Files version 6.2.2 last updated on Feb 03, 2023

Steps to Reproduce

Opened Files New Windows as Administrator by right clicking on the icon in the dock (with root privileges to regular user and as Root user both) It opens fine, asking for password It shows only Home and Root partitions, no other partitions on the disk Opening Files as regular user can see these additional partitions fine

Screenshots showing the issue attached Screenshot from 2023-02-09 23 10 18 Screenshot from 2023-02-09 23 09 20 Screenshot from 2023-02-09 23 30 04

Expected Behavior

Files in Administrator Mode (with root privileges to regular user and as Root user both) should show other partitions as well, not just Home and Root It used to show these partitions in the Elementary OS 6.2

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

sajid@eOS:~$ sudo io.elementary.files
[sudo] password for sajid:         

** (io.elementary.files:32146): WARNING **: 23:29:22.060: Application.vala:123: Running Files as root using sudo is not possible. Please use the command: io.elementary.files-pkexec [folder]
sajid@eOS:~$ sudo io.elementary.files-pkexec

** (io.elementary.files:32379): WARNING **: 23:29:46.167: BookmarkList.vala:74: Could not create bookmarks directory: Error creating directory /root/.config/gtk-3.0: File exists

** (io.elementary.files:32379): CRITICAL **: 23:29:46.253: granite_widgets_dynamic_notebook_get_tab_position: assertion 'tab != NULL' failed

** (io.elementary.files:32379): CRITICAL **: 23:29:46.408: TrashMonitor.vala:69: Operation not supported
sajid@eOS:~$ io.elementary.files-pkexec

** (io.elementary.files:32724): CRITICAL **: 23:30:20.261: granite_widgets_dynamic_notebook_get_tab_position: assertion 'tab != NULL' failed

** (io.elementary.files:32724): CRITICAL **: 23:30:20.279: TrashMonitor.vala:69: Operation not supported

Hardware Info

sajid@eOS:~$ lsb_release -a No LSB modules are available. Distributor ID: Elementary Description: elementary OS 7 Horus Release: 7 Codename: horus

sajid@eOS:~$ uname -a Linux eOS 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

sajid@eOS:~$ sudo lshw -short H/W path Device Class Description

                                 system         HP ENVY x360 Convertible 15-ee0xxx (8JV02AV)

/0 bus 876F /0/0 memory 128KiB BIOS /0/4 processor AMD Ryzen 5 4500U with Radeon Graphics /0/4/5 memory 384KiB L1 cache /0/4/6 memory 3MiB L2 cache /0/4/7 memory 8MiB L3 cache /0/24 memory 32GiB System Memory /0/24/0 memory 16GiB SODIMM DDR4 Synchronous Unbuffered (Unr /0/24/1 memory 16GiB SODIMM DDR4 Synchronous Unbuffered (Unr /0/100 bridge Renoir/Cezanne Root Complex /0/100/0.2 generic Renoir/Cezanne IOMMU /0/100/1.3 bridge Renoir/Cezanne PCIe GPP Bridge /0/100/1.3/0 wlo1 network RTL8822CE 802.11ac PCIe Wireless Network Adap /0/100/2.1 bridge Renoir/Cezanne PCIe GPP Bridge /0/100/2.1/0 mmc0 bus RTS522A PCI Express Card Reader /0/100/2.3 bridge Renoir/Cezanne PCIe GPP Bridge /0/100/2.3/0 /dev/nvme0 storage Samsung SSD 970 EVO Plus 1TB /0/100/2.3/0/0 hwmon4 disk NVMe disk /0/100/2.3/0/2 /dev/ng0n1 disk NVMe disk /0/100/2.3/0/1 /dev/nvme0n1 disk 1TB NVMe disk /0/100/2.3/0/1/1 /dev/nvme0n1p1 volume 511MiB Windows FAT volume /0/100/2.3/0/1/2 /dev/nvme0n1p2 volume 198GiB Windows NTFS volume /0/100/2.3/0/1/3 /dev/nvme0n1p3 volume 629MiB Windows NTFS volume /0/100/2.3/0/1/4 /dev/nvme0n1p4 volume 511MiB Windows FAT volume /0/100/2.3/0/1/5 /dev/nvme0n1p5 volume 15GiB Linux swap volume /0/100/2.3/0/1/6 /dev/nvme0n1p6 volume 59GiB EXT4 volume /0/100/2.3/0/1/7 /dev/nvme0n1p7 volume 73GiB EXT4 volume /0/100/2.3/0/1/8 /dev/nvme0n1p8 volume 180GiB Windows NTFS volume /0/100/2.3/0/1/9 /dev/nvme0n1p9 volume 200GiB Windows NTFS volume /0/100/2.3/0/1/a /dev/nvme0n1p10 volume 200GiB Windows NTFS volume /0/100/8.1 bridge Renoir Internal PCIe GPP Bridge to Bus /0/100/8.1/0 /dev/fb0 display Renoir /0/100/8.1/0.1 card0 multimedia Renoir Radeon High Definition Audio Controlle /0/100/8.1/0.1/0 input24 input HD-Audio Generic HDMI/DP,pcm=3 /0/100/8.1/0.1/1 input25 input HD-Audio Generic HDMI/DP,pcm=7 /0/100/8.1/0.2 generic Family 17h (Models 10h-1fh) Platform Security /0/100/8.1/0.3 bus Renoir/Cezanne USB 3.1 /0/100/8.1/0.3/0 usb1 bus xHCI Host Controller /0/100/8.1/0.3/0/3 generic ELAN:ARM-M4 /0/100/8.1/0.3/0/4 input31 multimedia HP Wide Vision HD Camera: HP Wi /0/100/8.1/0.3/1 usb2 bus xHCI Host Controller /0/100/8.1/0.4 bus Renoir/Cezanne USB 3.1 /0/100/8.1/0.4/0 usb3 bus xHCI Host Controller /0/100/8.1/0.4/0/1 communication Bluetooth Radio /0/100/8.1/0.4/0/2 input14 input XiaoMi Mi Wireless Mouse System Control /0/100/8.1/0.4/1 usb4 bus xHCI Host Controller /0/100/8.1/0.5 card2 multimedia Raven/Raven2/FireFlight/Renoir Audio Processo /0/100/8.1/0.6 card1 multimedia Family 17h (Models 10h-1fh) HD Audio Controll /0/100/8.1/0.6/0 input29 input HD-Audio Generic Mic /0/100/8.1/0.6/1 input30 input HD-Audio Generic Headphone /0/100/8.1/0.7 generic Raven/Raven2/Renoir Sensor Fusion Hub /0/100/14 bus FCH SMBus Controller /0/100/14.3 bridge FCH LPC Bridge /0/100/14.3/0 system PnP device PNP0c02 /0/100/14.3/1 generic PnP device HPQ8001 /0/100/14.3/2 system PnP device PNP0c02 /0/100/14.3/3 system PnP device PNP0c01 /0/101 bridge Renoir PCIe Dummy Host Bridge /0/102 bridge Renoir PCIe Dummy Host Bridge /0/103 bridge Renoir PCIe Dummy Host Bridge /0/104 bridge Renoir Device 24: Function 0 /0/105 bridge Renoir Device 24: Function 1 /0/106 bridge Renoir Device 24: Function 2 /0/107 bridge Renoir Device 24: Function 3 /0/108 bridge Renoir Device 24: Function 4 /0/109 bridge Renoir Device 24: Function 5 /0/10a bridge Renoir Device 24: Function 6 /0/10b bridge Renoir Device 24: Function 7 /1 power BN03051 /2 input0 input Power Button /3 input1 input Lid Switch /4 input17 input HP WMI hotkeys /5 input18 input ELAN2514:00 04F3:2B0A /6 input19 input ELAN2514:00 04F3:2B0A UNKNOWN /7 input2 input Power Button /8 input20 input ELAN2514:00 04F3:2B0A UNKNOWN /9 input21 input ELAN2514:00 04F3:2B0A Stylus /a input26 input SYNA32A1:00 06CB:CE17 Mouse /b input27 input SYNA32A1:00 06CB:CE17 Touchpad /c input3 input AT Translated Set 2 keyboard /d input4 input Video Bus

Screenshot from 2023-02-09 23 47 14

jeremypw commented 1 year ago

Files deliberately does not show network and trash bookmarks when running as root as they do not work as root. There does not seem to be any different code for the device list however. So presumably the GLib.VolumeMonitor is only returning the root partition when running as root in your case. When I run as root, I get another partition which is defined in etc/fstab and this operates normally. Similar partitions on the same disk which are not defined in etc/fstab do not appear when running as root unless they have already been mounted as a normal user. Nautilus (Gnome Files) works in the same way.

This appears to be to do with the way the underlying libraries work rather than Files itself.