-
1. Re: Setting windows directory security with ColdFusion
Owain North Mar 4, 2010 8:44 AM (in response to ilssac)Never tried it, but don't see why it wouldn't work - how about using .NET objects through Coldfusion? I had to create a VB.net program recently which sets NTFS permissions, and the code was thus:
Dim dirInfo As New DirectoryInfo(homePath)
Dim dirSecurity As DirectorySecurity = dirInfo.GetAccessControl()Dim accessRule As New FileSystemAccessRule(ntUsername, FileSystemRights.FullControl, _
InheritanceFlags.ContainerInherit + InheritanceFlags.ObjectInherit,
PropagationFlags.None, AccessControlType.Allow)
dirSecurity.AddAccessRule(accessRule)
dirInfo.SetAccessControl(dirSecurity)Don't know if you could do that through CF? As long as the user context running CF has permissions, I'd forsee no issues doing it over a network.
O.

