> 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

 

Using SetNamedSecurityInfo did the trick.  Thanks a lot for all your help.  By the way, do you know a good source of information for win32 api stuff?  The resource I am using (ActivePython’s documentation) doesn’t make any note about the SetFileSecurity function’s limitations or being obsolete and I would like to avoid beating my head against the wall in the future.

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

Reply via email to