On 03/07/2023 20:45, Greg Wooledge wrote:
Who or what mounted the device?
udiskd (udisks2 package) in response to a d-bus call from GUI. There is the udisksctl(1) CLI tool as well.
On an external ex4 drive it is possible to chown directories to a specific user or a group, however it would not work for any UID on an arbitrary computer.
FAT has no notion of ownership, so it is mounted with UID of the current user.