<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div><div>The permissions are applied to the directory but subdirectories and files within the directory aren't inheriting the permissions. &nbsp;I can manually go the Advanced Security Settings for the directory and check "Apply these permissions to objects and/or container within this container only" to get the desired result.&nbsp;</div></div><div><br></div><div><div><div>There was the same issue listed in the archive&nbsp;<a href="http://mail.python.org/pipermail/python-win32/2006-March/004472.html">http://mail.python.org/pipermail/python-win32/2006-March/004472.html</a>, but there was no response.</div></div></div><div><br></div><div>Any ideas what I'm missing?</div><div><br></div><div>Here is the sample code I'm using:</div><div><br></div><div><div>&gt;&gt;&gt; user,domain,type =
 &nbsp;win32security.LookupAccountName("","DOMAIN\\username")</div><div>&gt;&gt;&gt;&nbsp;sd = win32security.GetFileSecurity("C:\\testdir",win32security.DACL_SECURITY_INFORMATION)</div><div>&gt;&gt;&gt;&nbsp;dacl = sd.GetSecurityDescriptorDacl()</div><div>&gt;&gt;&gt;&nbsp;dacl.AddAccessAllowedAceEx(win32security.ACL_REVISION_DS,win32security.OBJECT_INHERIT_ACE|win32security.CONTAINER_INHERIT_ACE,win32file.FILE_ALL_ACCESS,user)</div><div>&gt;&gt;&gt;&nbsp;sd.SetSecurityDescriptorDacl(1,dacl,0)</div><div>&gt;&gt;&gt;&nbsp;win32security.SetFileSecurity("C:\\testdir",win32security.DACL_SECURITY_INFORMATION,sd)</div></div><div><br></div><div>Thanks!</div><div style="position:fixed"></div>


</div></body></html>