문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top