![為什麼這些選項沒有反映在 mount 的輸出中?](https://rvso.com/image/1346173/%E7%82%BA%E4%BB%80%E9%BA%BC%E9%80%99%E4%BA%9B%E9%81%B8%E9%A0%85%E6%B2%92%E6%9C%89%E5%8F%8D%E6%98%A0%E5%9C%A8%20mount%20%E7%9A%84%E8%BC%B8%E5%87%BA%E4%B8%AD%EF%BC%9F.png)
# mount -t ntfs-3g -o no_def_opts,windows_names,noatime,uid=1000,gid=1000 /dev/disk/by-id/ata-Maxtor_6V250F0_V593GLTG-part1 /mnt/ata-Maxtor_6V250F0_V593GLTG/
# mount
/dev/sda1 on /mnt/ata-Maxtor_6V250F0_V593GLTG type fuseblk (rw,nosuid,nodev,noatime,user_id=0,group_id=0,default_permissions,blksize=4096)
當我查看以下輸出時,所有者和群組已正確設定(根據 ID):
ls -la /mnt/ata-Maxtor_6V250F0_V593GLTG
當沒有 uid=1000,gid=1000 (第一個指令)時,就沒有
default_permissions
在輸出中(第二個命令)。
根據 mount.fuse 的手冊頁:
default_permissions
By default FUSE doesn't check file access permissions, the filesystem is free to implement it's access policy or leave it to the underlying file access
mechanism (e.g. in case of network filesystems). This option enables permission checking, restricting access based on file mode. This is option is usually
useful together with the allow_other mount option.
所以有點令人困惑,UID 和 GID 仍然是 0(第二個指令輸出),但設定了另一個選項。
我還注意到,儘管 ntfs-3g 是一個 FUSE 檔案系統,但它與其他檔案系統不同:
非特權使用者無法使用外部 FUSE 庫掛載 NTFS 區塊裝置。可以將磁碟區安裝為 root,或使用整合的 FUSE 支援重建 NTFS-3G 並使其 setuid root。請參閱更多資訊: http://tuxera.com/community/ntfs-3g-faq/#unprivileged
有人知道上述「問題」的原因嗎?
無論如何,它運行良好。只是好奇。