I want to mount the device /dev/sda3
to the directory /foo/bar/baz
. After mounting the directory should have the uid of user johndoe
. So I did:
sudo -u johndoe mkdir /foo/bar/baz
stat -c %U /foo/bar/baz
johndoe
and added the following line to my /etc/fstab
:
/dev/sda3 /foo/bar/baz ext4 noexec,noatime,auto,owner,nodev,nosuid,user 0 1
When I do now sudo -u johndoe mount /dev/sda3
the command stat -c %U /foo/bar/baz
results in root
rather than johndoe
. What is the best way to mount this ext4-filesystem with uid johndoe
set?