Tôi muốn gắn thiết bị /dev/sda3
vào thư mục /foo/bar/baz
. Sau khi gắn thư mục nên có uid của người dùng johndoe
. Tôi cũng vậy:
sudo -u johndoe mkdir /foo/bar/baz
stat -c %U /foo/bar/baz
johndoe
và thêm dòng sau vào /etc/fstab
:
/dev/sda3 /foo/bar/baz ext4 noexec,noatime,auto,owner,nodev,nosuid,user 0 1
Khi tôi làm bây giờ sudo -u johndoe mount /dev/sda3
lệnh stat -c %U /foo/bar/baz
kết quả root
thay vì johndoe
. Cách tốt nhất để gắn hệ thống tập tin ext4 này với tập hợp uid là johndoe
gì?