Mounting filesystem with special user id set
Posted
by
qbi
on Ask Ubuntu
See other posts from Ask Ubuntu
or by qbi
Published on 2011-04-08T07:33:15Z
Indexed on
2012/07/09
21:23 UTC
Read the original article
Hit count: 248
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?
© Ask Ubuntu or respective owner