[Samba] Meaning of user.DOSATTRIB

Günter Kukkukk linux at kukkukk.com
Wed Aug 26 15:37:30 UTC 2015


Am 26.08.2015 um 16:22 schrieb Mark Foley:
> OK, thanks, I've seen such an attribute correlation list elsewhere. So what does
> the 65 character string mean?
> 
> user.DOSATTRIB=0sMHgyMAAAAwADAAAAEQAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPnD7jBHStABAAAAAAAAAAA=
> 
> Obviously this isn't a bunch of 0x1's and 0x2s bit fields (or are they?). 
> 
> These attributes are from a file on the Redirected Folders directory hosted on
> the Samba4 AD/DC. I believe the attributes are created by the Windows client
> when files are created/modified (though I'm not sure about that). On the other
> hand, I've only come across the bit-field documentation on the web, so maybe
> these series of letters are a Samba thing.
> 
> What I'm looking to do is understand what they mean, if anything.
> 
> btw - the files for this user seem to have mostly the same attribute value
> character sequence except it changes way down at the end where in this example
> you have "PnD7jBHStAB". Don't know if that's meaningful.
> 
> Note also that doing getfattr from Linux on files from a mounted Windows C:
> drive I get nothing at all, even on %USERNAME%\Application Data, which I would
> think should have either 0x2 or 0x4.  So maybe these Redirected Folder file
> DOSATTRIBs are a Samba thing?
> 
> --Mark
> 
> -----Original Message-----
>> From: "L.P.H. van Belle" <belle at bazuin.nl>
>> To: "samba at lists.samba.org" <samba at lists.samba.org>
>> Date: Wed, 26 Aug 2015 09:07:06 +0200
>> Subject: Re: [Samba] Meaning of user.DOSATTRIB
>>
>> Hai, 
>>
>> This is al about samba ea ( extended attibutes ) support. 
>>
>> Samba can map attibutes in two ways:
>> Mapping DOS file attributes to UNIX permissions
>> Storing the DOS attributes in extended file attributes
>>
>> The user.DOSATTRIB extended attribute contains a bit field indicating the state of each DOS attribute:
>> Read-Only = 0x1
>> Hidden    = 0x2
>> System    = 0x4
>> Archive   = 0x20
>>
>> and in smb.conf related (below is enableing ea support) 
>> ea support = yes
>> map hidden = no
>> map system = no
>> map archive = no
>> map readonly = no
>> store dos attributes = yes
>>
>> and if you use mac osx also, 
>> also add. 
>> vfs objects = streams_xattr
>> oplocks = no
>>
>> and you can do something like: 
>> setfattr -n user.DOSATTRIB -v '"0x6"' desktop.ini
>> Note the escaping of the quotes in the value; 
>> This is needed to force the extended attribute to contain a string instead of an integer.
>>
>> (0x6 = hidden  + System ) 
>>
>> and correct me if im wrong here. 
>>
>>
>> Greetz, 
>>
>> Louis
>>
>>
>>> -----Oorspronkelijk bericht-----
>>> Van: samba [mailto:samba-bounces at lists.samba.org] Namens Mark Foley
>>> Verzonden: woensdag 26 augustus 2015 07:55
>>> Aan: samba at lists.samba.org
>>> Onderwerp: [Samba] Meaning of user.DOSATTRIB
>>>
>>> I have the following attributes for a typical file on my 
>>> redirected folders
>>> residing on my Samba4 AD/DC:
>>>
>>> $ getfattr -d "Newletters/Newsletter 2013-09.docx"
>>> # file: Newletters/Newsletter 2013-09.docx
>>> user.DOSATTRIB=0sMHgyMAAAAwADAAAAEQAAACAAAAAAAAAAAAAAAAAAAAAAAA
>>> AAAAAAAPnD7jBHStABAAAAAAAAAAA=
>>>
>>> What do these characters mean? I'm searching for a particular 
>>> attribute. I have
>>> found nothing searching the web or samba wiki.
>>>
>>> (btw - I see that Marco De Vitis asked a similar question on 
>>> the list back in
>>> 2007, but I've seen no response.)
>>>
>>> --Mark
>>>
>>> -- 
>>> To unsubscribe from this list go to the following URL and read the
>>> instructions:  https://lists.samba.org/mailman/options/samba
>>>
>>>
>>
>>
>> -- 
>> To unsubscribe from this list go to the following URL and read the
>> instructions:  https://lists.samba.org/mailman/options/samba
>>
> 

Hi Mark,

the internal format of the user.DOSATTRIB xattr has changed over time.
Initially it contained only a hex ascii representation of the DOS attributes,
see struct ... xattr_DosInfoFFFFCompat in the mentioned IDL file below.
Over time additional more complex data has been added.

All used structures can now be contained inside a "union" - so old
formats can still be detected and used.

xattr IDL-file:
===============
https://git.samba.org/?p=samba.git;a=blob_plain;f=librpc/idl/xattr.idl;hb=dba9e631bd1e1c7e00430b72f0c60b32ee4eeb33

The data contents is now an NDR encoded *data blob* - so not easily readable.

I have had no recent look at the sources, but i guess that smbclient's "allinfo <name>" subcmd
should display that info, too. (But that outcome can come from different internal storage...)

Cheers, Günter

-- 




More information about the samba mailing list