Change directory permission under windows

__schronos__ schronos at yahoo.com
Wed Nov 8 10:44:55 EST 2006


Hi.

  I would like to add people with full control access to a directory. I
can do it to a file in the following way:

		info=win32security.DACL_SECURITY_INFORMATION
		sd=win32security.GetFileSecurity(DIR, info)
		acl=sd.GetSecurityDescriptorDacl()
		sidUser=win32security.LookupAccountName(None,USER)[0]
		acl.AddAccessAllowedAce(win32file.FILE_ALL_ACCESS, sidUser)
		sd.SetSecurityDescriptorDacl(1, acl, 0)
		win32security.SetFileSecurity(dir, info, sd)

and it work correctly, but if I try to do the same to a directory only
the "special permission" checkbox is checked and this is not useful to
me because I need a "full control" so that files under the directory
can inheritage the directory rigths.

Can anybody help me

Thank's




More information about the Python-list mailing list