Question

I have a program in which I do the following

 oFolderACL.AddAccessRule(New Security.AccessControl.FileSystemAccessRule(strDomaine & "\" & oUtilisateur.UserName, oAccessControl, Security.AccessControl.InheritanceFlags.ContainerInherit Or Security.AccessControl.InheritanceFlags.ObjectInherit, Security.AccessControl.PropagationFlags.None, oAccessType))

I would like to be able to do the same with the group CREATOR OWNER. Only problem is that depending of the computer I do it, the name can change so I can't use the name itself. Is there a way in .NET to retrieve the name (or identityreference) of this group ?

thanks

Was it helpful?

Solution

You can get the identity reference for the CREATOR OWNER using the SID:

IdentityReference identityReference = new SecurityIdentifier("S-1-3-0");

There is a listing of the other "well known" SIDs here:

http://support.microsoft.com/kb/243330

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top