Is it possible to mount a drive without changing the directory owner to root? [closed]

When I'm mounting a drive it changes both the owner of the directory and the write and read premissions. For some reason chmod command doesn't work, and I can't change it with the UI because of the ownership. Is there a way to mount the drive but keep the ownership? I've used sudo mount to mount it and tried sudo chown and sudo chmod to change ownership and premissions respectively, none of them worked. the partition type is FAT32


When I'm mounting a drive it changes both the owner of the directory and the write and read premissions.

... to the user you mount it with otherwise it mounts to root.

For some reason chmod command doesn't work, and I can't change it with the UI because of the ownership.

chmod only works on posix compliant systems. That is for instance ext, and not ntfs or fat.

Is there a way to mount the drive but keep the ownership? I've used sudo mount to mount it and tried sudo chown and sudo chmod to change ownership and premissions respectively, none of them worked. the partition type is FAT32

FAT32: during the mount you tell it to use a specific user. Example:

sudo mount -t vfat /dev/{device} /media/{mountpoint} -o rw,uid=1000,gid=1000,umask=113,dmask=002

where 1000 is your admin and files are set to rw-rw-r-- and folders are set to rwxrwxr-x (it uses umask so a reversed chmod).

id -u {username}

to find the userid of a user.

You can use the actual username in /etc/fstab if you want.