Dennis Feiock wrote:

> When I tested using AddAccessAllowedAceEx on a folder, I noticed that the 
> existing subfolders that have inheritance enabled do
> not automatically take on the added permission.  When creating a new folder, 
> it added the ACE as it should.  Any suggestions?
> Here is the code I used (note: I couldn't find information on the SetDacl 
> options, so that might be it):
...
>>> win32security.SetFileSecurity(fullpath,win32security.DACL_SECURITY_INFORMATION,sd1)

Try using SetNamedSecurityInfo instead. I think SetFileSecurity is actually 
considered
obsolete now.
After playing around with both of these, it appears SetNamedSecurityInfo will
cause the inherited ACEs to propagate to existing subfolders, whereas 
SetFileSecurity doesn't.

win32security.SetNamedSecurityInfo(fullpath, win32security.SE_FILE_OBJECT,
        win32security.DACL_SECURITY_INFORMATION,None, None, dacl1, None)

        hth
            Roger



_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to