我正在尝试使用以下设置在 Linux 中挂载 NTFS 文件系统:
root
一个组拥有并拥有一个组win。权限应设置为 775。为此,我在 fstab 中添加了以下记录:
/dev/sda7 /mnt/win/users_data ntfs-3g noauto,inherit,usermapping=/etc/ntfs-3g.usermapping,uid=0,gid=1002,umask=0002 0 0
Run Code Online (Sandbox Code Playgroud)
这是/etc/ntfs-3g.usermapping文件的内容:
:win:S-1-5-21-3452292639-2475245894-2622236828-1002
:win:S-1-5-21-3452292639-2475245894-2622236828-1003
:win:S-1-5-21-3452292639-2475245894-2622236828-1005
:win:S-1-5-21-3452292639-2475245894-2622236828-1004
:win:S-1-5-21-3452292639-2475245894-2622236828-1009
...
Run Code Online (Sandbox Code Playgroud)
挂载文件系统后,控制台中会显示以下消息:
$ sudo mount /mnt/win/users_data
There were no valid user or no valid group
Run Code Online (Sandbox Code Playgroud)
挂载文件系统中的文件和目录在 Linux (root:win 775) 中拥有正确的所有权和权限。但是在 Windows 中,所有用户都可以对 Linux 在文件系统中创建的文件进行所有操作。
我究竟做错了什么?以及如何以上述方式挂载 NTFS 文件系统?