I'm trying to mount NTFS filesystem in Linux with the following settings:
- In Linux all files and directories in NTFS should be owned by
rootand have a group
win. Permissions should be set to 775.
- All files and directories created by Linux in NTFS filesystem should have in Windows the same ownership and permissions as a directory containing newly created file or directory.
To this end, I've added the following record to fstab:
/dev/sda7 /mnt/win/users_data ntfs-3g noauto,inherit,usermapping=/etc/ntfs-3g.usermapping,uid=0,gid=1002,umask=0002 0 0
Here is a content of the
: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 ...
When the filesystem is mounted, the following message appears in console:
$ sudo mount /mnt/win/users_data There were no valid user or no valid group
Files and directories in mounted filesystem have the right ownership and permissions in Linux (root:win 775). But in Windows all users is permitted to do all operations over files created by Linux in the filesystem.
What am I doing wrong? And how to mount NTFS filesystem in the way described above?