Class LocalStoreInitialization
Provides helper facilities for initializing File-based License Stores.
Namespace: Sp.Agent.Configuration
Assembly: Sp.Agent.Local.dll
Methods
EnsureExistsAndConfigureAccessFor(SecurityIdentifier, DirectoryInfo)
Configures the specified directory
to have an explicit Allow ACL for the indicated sid
, and inherit other permissions from the parent.
Declaration
public static void EnsureExistsAndConfigureAccessFor(SecurityIdentifier sid, DirectoryInfo directory)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Principal.SecurityIdentifier | sid | The identity to confer the rights on. |
System.IO.DirectoryInfo | directory | The directory on which to apply the ACL entry. |
Remarks
One can employ System.Security.Principal.IdentityReference.Translate()
method to convert from other User/Group name representations to a System.Security.Principal.SecurityIdentifier.
var sid = (SecurityIdentifier)new NTAccount( accountNameString ).Translate( typeof( SecurityIdentifier ) );