我想允许用户脚本remount
作为“ro”或“rw”驱动器。
通过使用user
fstab 中的选项,我可以以用户身份成功安装和卸载驱动器,但-o remount,rw
失败。
用户无法使用该remount
选项吗?!?
/etc/fstab
读...
UUID=789f-4b3a-b0b2-c05955d7c5ad /mnt/nasbackup auto rw,user,noexec 0 2
但...
john@johnbox /mnt> mount UUID=789f-4b3a-b0b2-c05955d7c5ad
john@johnbox /mnt> mount | grep nvme
/dev/nvme0n1 on /mnt/nasbackup type ext4 (rw,nosuid,nodev,noexec,relatime,stripe=4,user=john)
john@johnbox /mnt> mount -o remount,ro UUID=789f-4b3a-b0b2-c05955d7c5ad
mount: /mnt/nasbackup: must be superuser to use mount.
dmesg(1) may have more information after failed mount system call.
john@johnbox /mnt [32]> umount UUID=789f-4b3a-b0b2-c05955d7c5ad
john@johnbox /mnt>