# How to show the content of the folder where I have mounted the linux/ubuntu (ext4) data partition using a graphical desktop manager ?



## ziomario (Oct 5, 2021)

Hello.

some time ago I tried to show the content of the folder where I have mounted a linux partition as root using a graphical file manager such as thunar. Now I'm trying to do the same but as a normal user level access and using some tools. The folder always look empty if I mount a linux ext4 partition. But it's not if I mount ntfs and ufs partitions. First of all I've mounted my linux partition with the command :


```
lklfuse -o type=ext4 /dev/ada0s1 /mnt/ada0s1 # CT500 (466 GB / Ubuntu 21.04)
```

I tried to do :

as normal user:


```
marietto@marietto:/mnt $ cd ada0s1
cd: ada0s1: Operation not permitted
```

with doas (already configured):


```
marietto@marietto:/mnt $ doas cd ada0s1
Password:
marietto@marietto:/mnt $
```

with gksu:


```
marietto@marietto:/mnt $ gksu cd ada0s1  

Gkr-Message: 13:54:04.826: secret service operation failed: The name org.freedesktop.secrets was not provided by
any .service files

(gksu:13667): Gtk-WARNING **: 13:54:04.830: Unable to locate theme engine in module_path: "adwaita",
Gkr-Message: 13:54:12.143: secret service operation failed: The name org.freedesktop.secrets was not provided by
any .service files
Gkr-Message: 13:54:12.144: secret service operation failed: The name org.freedesktop.secrets was not provided by
any .service files
LibGTop-Server(c=13679): [WARNING] pid 13679 received eof.
```

it asks for the password,but it does not want to show the content of the ada0s1 folder

with doas and thunar:


```
doas thunar /mnt/ada0s1
Password:
thunar: Failed to initialize Xfconf: La connessione ? closed

Error creating proxy: La connessione è chiusa (g-io-error-quark, 18)
Error creating proxy: La connessione è chiusa (g-io-error-quark, 18)
Error creating proxy: La connessione è chiusa (g-io-error-quark, 18)

(thunar:13695): thunar-WARNING **: 13:56:32.517: Nome "org.xfce.FileManager" perso nel messaggio dbus.

(thunar:13695): thunar-WARNING **: 13:56:32.517: Nome "org.freedesktop.FileManager1" perso nel messaggio dbus.
```

The folder is opened with thunar but it is empty.


----------



## sidetone (Oct 5, 2021)

`ls -l /mnt` and `df`

On the mount command, type out the full rw options. Mounts that use custom commands can also be put into fstab.

Root may need to change the directory permissions for that directory, as that can be done without that directory being mounted.

Try typing the whole directory, `/mnt/ada0s1` as what it was mounted as when using commands.


----------



## ziomario (Oct 5, 2021)

Isn't dangerous to mount it in rw mode ?


----------



## sidetone (Oct 5, 2021)

Oh. Then maybe ro option, but then again, the mount command should have allowed to cd there and view the directory.

Try writting the full directory, like, `doas cd /mnt/ada0s1`.

Another thing I noticed, is to use the /media directory for a mount point. Create the ad0s1 directory there (mkdir /media/ad0s1), and set the permissions. Then, mount it there. /mnt is for mounting a whole partition as /mnt.


----------



## ziomario (Oct 5, 2021)

```
root@marietto:/mnt # doas cd /mnt/ada0s1
Password:
root@marietto:/mnt #
```


```
marietto@marietto:/usr/home/marietto $ doas cd /mnt/ada0s1
Password:
marietto@marietto:/usr/home/marietto $
```


```
marietto@marietto:/media $ doas lklfuse -o type=ext4 /dev/ada0s1 /media/ada0s1
ok
```


```
marietto@marietto:/media $ doas mkdir /media/ad0s1
ok
```


```
marietto@marietto:/media $ doas cd /media/ada0s1
Password:
marietto@marietto:/media $
```


----------



## sidetone (Oct 5, 2021)

What about ext2fs(5)? You had a thread Thread im-looking-for-a-secure-ext-driver-for-linux-which-works-great-on-freebsd.80922, where someone said this works with ext4 partitions.

Try `fstyp` on the partition, which will confirm the filesystem.

Edit: fstyp(8) seems to have limits, so could give ext2 for other ext filetypes.


----------



## ziomario (Oct 5, 2021)

```
root@marietto:/media/ada0s1 # fstyp /dev/ada0s1
ext2fs
```


----------



## ziomario (Oct 5, 2021)

ok. this command :


```
fuse-ext2 /dev/ada0s1 /mnt/ada0s1
```

solved the previous problem.


----------



## drhowarddrfine (Oct 5, 2021)

Note that on Unix, BSD--and Linux, too--they are "directories" and not the Windows concept of "folders" which is not the same thing.


----------



## ziomario (Oct 5, 2021)

drhowarddrfine said:


> Note that on Unix, BSD--and Linux, too--they are "directories" and not the Windows concept of "folders" which is not the same thing.



what's the difference ?


----------



## cy@ (Oct 6, 2021)

It's nomenclature. UNIX (Linux) call them directories. So did MS-DOS call them directories. But when Windows 1.0 was created Microsoft and IBM (O/S2) needed some way to depict them in filemanager-like application. Hence the term folder was born. We may hate the term "folder," especially professionally, when clients who are IT professionals with CompSci degrees use the term. But to them it's a folder. But when you read UNIX doc or look at *BSD, Solaris, or Linux kernel code the term directory remains. It is what it is.


----------



## eternal_noob (Oct 6, 2021)

Everything is a file anyway.

PS: I hate it when people call a website "Homepage".


----------



## drhowarddrfine (Oct 6, 2021)

ziomario said:


> what's the difference ?


A guy who used to work for me had an excellent write up on this which I cannot find anymore (so sad). I just woke up so...

A directory is a filesystem object with a direct pathname which should contain an index to other resources. It may or may not contain objects itself.
A folder is a GUI that represents documents and other content which may also be in different locations other than that folder location.

His description was far better and technical than that but it's as far as I can go right now.


----------

