Tim Howarth wrote: > My problem with directories not accepting security descriptors was > not quite correct. > > When using; > > acl.AddAccessAllowedAce(win32file.FILE_ALL_ACCESS, sidUser) > > sd.SetSecurityDescriptorDacl(1, acl, 0) > > win32security.SetFileSecurity('g:\\TestACL\\pot',win32security. > DACL_SECURITY_INFORMATION,sd) > > > > The access is set for the directory but doesn't appear in the > Explorer permissions viewer (Win 2000) because AFAICT the permissions > will not be inherited by subdirectories or files (with these switched on > the access 'ticks' appear). > > So next problem how do I turn them on programmatically ? It appears the win32 extensions lack this capability. My MSDN CD has an article "HOWTO: Set Security on a NTFS Folder Programmatically" that shows exactly what you want (although in VB code!). It would be cool to add this support, and not _too_ much work - I would be happy to help, but don't have the time to do it all right now... Mark.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4