Setup
...
How To
Controlling what happens to existing File Permissions when using the Activate API to Secure a Folder
3 min
out of the box, activate uses the fileutilities setdirectoryaclex method to set permissions when applying security to ntfs folders setdirectoryaclex( path , accesscontrollist, action ) see the activate api documentation for the setdirectoryaclex overloads when setdirectoryaclex is run against a target folder that has existing permissions defined the accesscontrollist parameter defines what happens to existing permissions defined directly on the target folder e g prefixing with “ all;” overwrites any existing permissions and blocks inheritance no prefix “adds” the specific permissions to the folder acl and does not block inheritance the optional action parameter defines the changes that activate will make to sub folders that have permissions explicitly defined or inheritance disabled the action parameter is a treesecinfoaction enumeration, the values for which (from treesecinfoaction in the activate api) are true 165,165,165,166 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type example when setdirectoryaclex is used against the folder structure true 330,331 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type the results of the treesecinfoaction options are additional ace; the permission granting access to the group remains set no inheritance; no change, i e inheritance is blocked and a new set of permissions defined same as test1; no change, i e only permissions inherited from test1 apply additional ace; the permission granting access to the group is removed and only permissions inherited from test1 apply no inheritance; inheritance is re enabled and only permissions inherited from test1 apply same as test1; no change, i e only permissions inherited from test1 apply additional ace; the permission granting access to the group remains set no inheritance; inheritance is re enabled and only permissions inherited from test1 apply same as test1; no change, i e only permissions inherited from test1 apply