To make the script easier to read, I defined the custom constant of CUSTCON_ALLOW_INHERIT, whose sum represents these three flags. This custom constant configures the ACE so that the DACLs below the home directory inherit the ACE.
The AceType value specifies whether the ACE will have Allow or Deny type permissions. In the script, I use the ACETYPE_ACCESS_ALLOWED constant to specify Allow type permissions. In other words, the subdirectories below the user account's home directory will inherit the ACE and the user account will have Allow type permissions.
The oTrustee value specifies the trustee that you want to assign to the ACE. To assign a trustee to the ACE, the SetACE function needs the trustee's user-account name, domain name, and SID. The SetTrustee function neatly compartmentalizes the trustee information for the SetACE function.
The SetTrustee function takes four parameters: the moniker to the CIMv2 namespace and the trustee's domain name, user-account name, and SID. The script obtains the domain name from the Web form's User account domain text box and the user-account name from the form's User account name text box. The script obtains the SID from the QuerySid function that I described earlier. . . .


sean August 28, 2001