Change directory permission under windows

S

__schronos__

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,270
Latest member
TopCryptoTwitterChannels_

Latest Threads

Top