SetFileSecurity returning error ERROR_INVALID_PRIMARY_GROUP
hi. have program migrates data 1 ntfs volume ntfs volume on cifs. program runs service under specific service account has domain admin permissions.
we call setfilesecurity , getlasterror returning error error_invalid_primary_group. i'm trying understand what error_invalid_primary_group means? primary group? here pseudo code (i left out part create file in destination):
security_information si = owner_security_information | group_security_information | dacl_security_information;
if (false(getfilesecurity(wstrsource, si, psecdesc, cbbuffer, (lpdword) pcbdescdesc)))
{
*peoserr = getlasterror();
return kereadingfile;
}
si = unprotected_dacl_security_information | group_security_information | dacl_security_information;
if (false(setfilesecurity(wstrdestination, si, psecdesc)))
{
*peoserr = getlasterror();
return kewritingfile;
}
i note files not owned process. customer thought ad user owner account disabled in ad has since confirmed enabled.
any appreciated!
adam
primary group remnant of posix-compliance in windows os. default, it's set domain users - can change if needed following http://technet.microsoft.com/en-us/library/cc776334(ws.10).aspx
primary group being used when assigning security descriptors during object creation (for ad specific process, refer http://msdn.microsoft.com/en-us/library/windows/desktop/ms676927(v=vs.85).aspx ) - potentially might related seeing (although in case applies file system)
hth
marcin
Windows Server > Directory Services
Comments
Post a Comment