FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Fri May 07, 2021 00:39



Post new topic Reply to topic  [ 5 posts ] 
Understanding group / owner pair in UserMapping 
Author Message

Joined: Mon Mar 31, 2014 13:43
Posts: 113
Post Understanding group / owner pair in UserMapping
Hi,
What is the difference between the following mappings:
Code:
foo::x-y-z-1000
foo:foo:x-y-z-1000

When creating a new file, both result in a Windows GID of x-y-z-1000

Thanks,
Ulf


Thu Nov 19, 2015 00:32
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Understanding group / owner pair in UserMapping
Hi,

Quote:
What is the difference between the following mappings:

Code:
foo::x-y-z-1000

This defines the Linux owner "foo" as being represented in Windows by the SID "x-y-z-1000" (assuming "x-y-z-" is "S-1-5-21-x-y-z") and conversely. It does not define anything for any Windows group or any Linux group.
Code:
foo:foo:x-y-z-1000

This defines the Linux owner "foo" as being represented in Windows by the SID "x-y-z-1000" and it defines the Linux group "foo" as being represented in Windows by the SID "x-y-z-1000" and conversely.
Quote:
When creating a new file, both result in a Windows GID of x-y-z-1000

You should not get "x-y-z-1000" as the group of a file (I suppose "Windows GID" to mean the group SID of a file) unless this group mapping is described in the user mapping file.

Regards

Jean-Pierre


Thu Nov 19, 2015 09:55
Profile

Joined: Mon Mar 31, 2014 13:43
Posts: 113
Post Re: Understanding group / owner pair in UserMapping
Now I did some experiments:
Code:
ich::S-1-5-21-2466938724-721355277-839723094-1003
::S-1-5-21-2466938724-721355277-839723094-10000

ich@ThinkPad-T500:/$ ntfs-3g.secaudit /mnt/Daten/Users/ich/Documents/
secaudit 1.4.2 : NTFS security data auditing
Directory /mnt/Daten/Users/ich/Documents/
Windows attrib : 0x11
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-513
Interpreted Unix owner 1000, group 0, mode 0700
No errors were found

Code:
ich:ich:S-1-5-21-2466938724-721355277-839723094-1003
::S-1-5-21-2466938724-721355277-839723094-10000

ich@ThinkPad-T500:/$ ntfs-3g.secaudit /mnt/Daten/Users/ich/Documents/
secaudit 1.4.2 : NTFS security data auditing
Directory /mnt/Daten/Users/ich/Documents/
Windows attrib : 0x11
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-513
Interpreted Unix owner 1000, group 0, mode 0700
No errors were found

Code:
ich::S-1-5-21-2466938724-721355277-839723094-1003
:windows:S-1-5-21-2466938724-721355277-839723094-513
::S-1-5-21-2466938724-721355277-839723094-10000

ich@ThinkPad-T500:/$ ntfs-3g.secaudit /mnt/Daten/Users/ich/Documents/
secaudit 1.4.2 : NTFS security data auditing
Directory /mnt/Daten/Users/ich/Documents/
Windows attrib : 0x11
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-513
Interpreted Unix owner 1000, group 1999, mode 0700
No errors were found

Code:
ich:ich:S-1-5-21-2466938724-721355277-839723094-1003
:windows:S-1-5-21-2466938724-721355277-839723094-513
::S-1-5-21-2466938724-721355277-839723094-10000

ich@ThinkPad-T500:/$ ntfs-3g.secaudit /mnt/Daten/Users/ich/Documents/
secaudit 1.4.2 : NTFS security data auditing
Directory /mnt/Daten/Users/ich/Documents/
Windows attrib : 0x11
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-513
Interpreted Unix owner 1000, group 1999, mode 0700
No errors were found

I do not see any difference from ich::... vs ich:ich:... That's what I'm wondering about.

Note: User ich is not member of group 1999(windows). The group only serves for mapping to the Windows group SID S-1-5-21-x-x-x-513, common for all (prospective) Windows users, to distinguish from Windows-irregular S-1-5-32-544 as group SID from creating new files with NTFS-3G, which is translated as root. This approach could possibly change that 8) :oops:

The standard group membership here on my Ubuntu system:
Code:
/$ id
uid=1000(ich) gid=1000(ich) Gruppen=1000(ich),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),115(lpadmin),131(sambashare)


Fri Nov 20, 2015 01:58
Profile

Joined: Mon Mar 31, 2014 13:43
Posts: 113
Post Re: Understanding group / owner pair in UserMapping
Now I created files:
fstab:
Code:
UUID=xxxxxxxxxxxxxxxx /mnt/Daten       ntfs    defaults,inherit,windows_names,hide_dot_files        0       0

Code:
ich::S-1-5-21-2466938724-721355277-839723094-1003

ich@ThinkPad-T500:/$ touch /mnt/Daten/Users/ich/Documents/ich-__
ich@ThinkPad-T500:/$ ntfs-3g.secaudit -v /mnt/Daten/Users/ich/Documents/ich-__
secaudit 1.4.2 : NTFS security data auditing
File /mnt/Daten/Users/ich/Documents/ich-__
        000000  01000480 14000000 24000000 00000000
        000010  34000000 01020000 00000005 20000000
        000020  20020000 01020000 00000005 20000000
        000030  20020000 02001c00 01000000 00031400
        000040  ff011f00 01010000 00000001 00000000
Computed hash : 0xb3935174
Windows attrib : 0x20
** There were no valid user or no valid group
Windows owner S-1-5-32-544
Windows group S-1-5-32-544
Interpreted Unix mode 0777 (owner and group are unmapped)
No errors were found

Code:
ich::S-1-5-21-2466938724-721355277-839723094-1003
::S-1-5-21-2466938724-721355277-839723094-10000

ich@ThinkPad-T500:/$ touch /mnt/Daten/Users/ich/Documents/ich-__default
ich@ThinkPad-T500:/$ ntfs-3g.secaudit -v /mnt/Daten/Users/ich/Documents/ich-__default
secaudit 1.4.2 : NTFS security data auditing
File /mnt/Daten/Users/ich/Documents/ich-__default
        000000  01000480 6c000000 88000000 00000000
        000010  14000000 02005800 03000000 00001400
        000020  ff011f00 01010000 00000005 12000000
        000030  00001800 ff011f00 01020000 00000005
        000040  20000000 20020000 00002400 ff011f00
        000050  01050000 00000005 15000000 647f0a93
        000060  0d02ff2a 56280d32 eb030000 01050000
        000070  00000005 15000000 647f0a93 0d02ff2a
        000080  56280d32 eb030000 01050000 00000005
        000090  15000000 647f0a93 0d02ff2a 56280d32
        0000a0  e12e0000
Computed hash : 0x127ddbe2
Windows attrib : 0x20
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-12001
Interpreted Unix owner 1000, group 1000, mode 0700
No errors were found

Code:
ich:ich:S-1-5-21-2466938724-721355277-839723094-1003

ich@ThinkPad-T500:/$ touch /mnt/Daten/Users/ich/Documents/ich-ich__
ich@ThinkPad-T500:/$ ntfs-3g.secaudit -v /mnt/Daten/Users/ich/Documents/ich-ich__
secaudit 1.4.2 : NTFS security data auditing
File /mnt/Daten/Users/ich/Documents/ich-ich__
        000000  01000480 6c000000 88000000 00000000
        000010  14000000 02005800 03000000 00001400
        000020  ff011f00 01010000 00000005 12000000
        000030  00001800 ff011f00 01020000 00000005
        000040  20000000 20020000 00002400 ff011f00
        000050  01050000 00000005 15000000 647f0a93
        000060  0d02ff2a 56280d32 eb030000 01050000
        000070  00000005 15000000 647f0a93 0d02ff2a
        000080  56280d32 eb030000 01050000 00000005
        000090  15000000 647f0a93 0d02ff2a 56280d32
        0000a0  eb030000
Computed hash : 0x127db0ec
Windows attrib : 0x20
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-1003
Interpreted Unix owner 1000, group 1000, mode 0700
No errors were found

Code:
ich:ich:S-1-5-21-2466938724-721355277-839723094-1003
::S-1-5-21-2466938724-721355277-839723094-10000

ich@ThinkPad-T500:/$ touch /mnt/Daten/Users/ich/Documents/ich-ich__default
ich@ThinkPad-T500:/$ ntfs-3g.secaudit -v /mnt/Daten/Users/ich/Documents/ich-ich__default
secaudit 1.4.2 : NTFS security data auditing
File /mnt/Daten/Users/ich/Documents/ich-ich__default
        000000  01000480 6c000000 88000000 00000000
        000010  14000000 02005800 03000000 00001400
        000020  ff011f00 01010000 00000005 12000000
        000030  00001800 ff011f00 01020000 00000005
        000040  20000000 20020000 00002400 ff011f00
        000050  01050000 00000005 15000000 647f0a93
        000060  0d02ff2a 56280d32 eb030000 01050000
        000070  00000005 15000000 647f0a93 0d02ff2a
        000080  56280d32 eb030000 01050000 00000005
        000090  15000000 647f0a93 0d02ff2a 56280d32
        0000a0  eb030000
Computed hash : 0x127db0ec
Windows attrib : 0x20
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-1003
Interpreted Unix owner 1000, group 1000, mode 0700
No errors were found

Code:
ich::S-1-5-21-2466938724-721355277-839723094-1003
:windows:S-1-5-21-2466938724-721355277-839723094-513
::S-1-5-21-2466938724-721355277-839723094-10000

ich@ThinkPad-T500:/$ touch /mnt/Daten/Users/ich/Documents/ich-_windows_default
ich@ThinkPad-T500:/$ ntfs-3g.secaudit -v /mnt/Daten/Users/ich/Documents/ich-_windows_default
secaudit 1.4.2 : NTFS security data auditing
File /mnt/Daten/Users/ich/Documents/ich-_windows_default
        000000  01000480 6c000000 88000000 00000000
        000010  14000000 02005800 03000000 00001400
        000020  ff011f00 01010000 00000005 12000000
        000030  00001800 ff011f00 01020000 00000005
        000040  20000000 20020000 00002400 ff011f00
        000050  01050000 00000005 15000000 647f0a93
        000060  0d02ff2a 56280d32 eb030000 01050000
        000070  00000005 15000000 647f0a93 0d02ff2a
        000080  56280d32 eb030000 01050000 00000005
        000090  15000000 647f0a93 0d02ff2a 56280d32
        0000a0  e12e0000
Computed hash : 0x127ddbe2
Windows attrib : 0x20
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-12001
Interpreted Unix owner 1000, group 1000, mode 0700
No errors were found

Code:
ich:ich:S-1-5-21-2466938724-721355277-839723094-1003
:windows:S-1-5-21-2466938724-721355277-839723094-513
::S-1-5-21-2466938724-721355277-839723094-10000

ich@ThinkPad-T500:/$ touch /mnt/Daten/Users/ich/Documents/ich-ich_windows_default
ich@ThinkPad-T500:/$ ntfs-3g.secaudit -v /mnt/Daten/Users/ich/Documents/ich-ich_windows_default
secaudit 1.4.2 : NTFS security data auditing
File /mnt/Daten/Users/ich/Documents/ich-ich_windows_default
        000000  01000480 6c000000 88000000 00000000
        000010  14000000 02005800 03000000 00001400
        000020  ff011f00 01010000 00000005 12000000
        000030  00001800 ff011f00 01020000 00000005
        000040  20000000 20020000 00002400 ff011f00
        000050  01050000 00000005 15000000 647f0a93
        000060  0d02ff2a 56280d32 eb030000 01050000
        000070  00000005 15000000 647f0a93 0d02ff2a
        000080  56280d32 eb030000 01050000 00000005
        000090  15000000 647f0a93 0d02ff2a 56280d32
        0000a0  eb030000
Computed hash : 0x127db0ec
Windows attrib : 0x20
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-1003
Interpreted Unix owner 1000, group 1000, mode 0700
No errors were found

Here, the difference is clear. :idea:

Much thanks for your investigation. :-)

When I would like to have Windows 7 "compatible" group SID, I know, I could use:
Code:
ich::S-1-5-21-2466938724-721355277-839723094-1003
:ich:S-1-5-21-2466938724-721355277-839723094-513

The culprit is, this is only possible for 1 user. With current design of NTFS-3G UserMapping, this "workaround" does not work for multiple users with Ubuntu.
So please think about Maybe add 4th parameter in UserMapping


Fri Nov 20, 2015 04:52
Profile

Joined: Mon Mar 31, 2014 13:43
Posts: 113
Post Re: Understanding group / owner pair in UserMapping
Aside, I guess, I see a bug, when using the file from the 2nd example with only:
Code:
ich::S-1-5-21-2466938724-721355277-839723094-1003

Code:
ich@ThinkPad-T500:/$ ntfs-3g.secaudit -v /mnt/Daten/Users/ich/Documents/ich-__default
secaudit 1.4.2 : NTFS security data auditing
File /mnt/Daten/Users/ich/Documents/ich-__default
        000000  01000480 6c000000 88000000 00000000
        000010  14000000 02005800 03000000 00001400
        000020  ff011f00 01010000 00000005 12000000
        000030  00001800 ff011f00 01020000 00000005
        000040  20000000 20020000 00002400 ff011f00
        000050  01050000 00000005 15000000 647f0a93
        000060  0d02ff2a 56280d32 eb030000 01050000
        000070  00000005 15000000 647f0a93 0d02ff2a
        000080  56280d32 eb030000 01050000 00000005
        000090  15000000 647f0a93 0d02ff2a 56280d32
        0000a0  e12e0000
Computed hash : 0x127ddbe2
Windows attrib : 0x20
** There were no valid user or no valid group
Windows owner S-1-5-21-2466938724-721355277-839723094-1003
Windows group S-1-5-21-2466938724-721355277-839723094-12001
Interpreted Unix mode 0700 (owner and group are unmapped)
No errors were found
ich@ThinkPad-T500:/$ ls -al /mnt/Daten/Users/ich/Documents/ich-__default
-rwxrwxrwx 1 root root 0 Nov 20 02:34 /mnt/Daten/Users/ich/Documents/ich-__default

secaudit results: Interpreted Unix mode 0700
ls -al results: -rwxrwxrwx


Fri Nov 20, 2015 05:36
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.