Why is a ext4 flash drive being mounted with the rights of a different user?

I have a computer using 20.04 with three users, where only one is a system administrator. If one of the other users puts in a FAT formatted USB thumb drive everything is fine. They can access it as expected. If the same drive with the same content is formatted as ext4, it is mounted within the correct users folder, but the drives folder has the administrator user as the owner. Why is that? Can I fix this without sudo and without bothering my non-techy users?

To be honest I expected ext4 to work more smooth within a linux ecosystem than FAT. I suspect it is because ext4 knows linux permissions, but then does it mean ext4 is nonsense for portable drives, because the user IDs vary from system to system?


Solution 1:

An ext4 flash drive is being mounted with root user's permissions, because ext4 supports Linux permissions, and Linux, by design, is a secure operating system. By default, users have full access under their own home folder only. They need to be granted access by the person administering the system to write elsewhere.

File systems not supporting Linux file permissions are indeed mounted with full rights for the user that inserts the drive.

Have the system administrator once grant permissions to folder on that ext4 drive, and the user will be able to use these folders.

If the user is the only one using that drive, you could grant permissions to the mount point. Even if the mount point is deleted once the drive is removed, the permission settings are remembered.

Can I fix this without sudo and without bothering my non-techy users?

If you are the administrator of the computer, it does not harm to have to use sudo: it is made so not anyone can ticker with the system.

If you are the administrator of the system, you are in charge, so, yes, you have to bother your non-techy users once to grant them the permissions you deem relevant.