ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-win32
python-win32
[python-win32] Setting NTFS Permissions on Tree
by Zakir B Durumeric other posts by this author
Nov 5 2009 1:51PM messages near this date
Re: [python-win32] More win32com woes: Wrapping COM objects | [python-win32] Get DN of Computer (OU Located)
Hi,
I'm trying to set permissions on an NTFS tree. Specifically I'm trying to add a propagable A
CE to the DACL on a top-level directory and hoping for it to recursively propagate to childr
en who do not have inherited permissions blocked. I'm currently tying to do this by calling 
SetNamedSecurityInfo. However, it appears that the ACE is only added to the top-level direct
ory. I'm passing both children_containers_inherit children_noncontainers_inherit  to AddAcce
ssAllowedAceEx and when I look at the ACE on the top-level directory it shows as being appli
ed to directory and all children... it's just that none of the permissions actually appear t
o be propagated to the children in the directory tree.

MSDN specifies that SetNamedSecurityInfo does propagate to children. However, I'm under the 
impression that this propagation isn't truly complete until you somehow manually force the c
hildren nodes to recalculate their DACLs and notice the new ACE that applies to them. Is thi
s correct and if so what is the correct way of forcing the children nodes to re-calculate vi
a win32security? I also noticed that in aclapi.h there is a function called TreeResetNamedSe
curityInfo (2003+) that appears to do what I'm looking for instead of SetNamedSecurityInfo, 
however it's not included in win32security. If it's not possible to manually to manually for
ce the recalculation in SetNamedSecurityInfo, is the next best bet to try to manually call o
ut to TreeResetNamedSecurityInfo or are there any other suggestions?

I would appreciate any light someone could spread on this issue -- I'm to the point of bangi
ng my head against the wall.

Thank you

Zakir Durumeric

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved