I'm attaching a Process Monitor dump which shows Salamander moving the file to a new directory and back and then Explorer doing the same. I think there's a useful hint as to what API Salamander should be calling. Regarding directories - according to my tests and to what Explorer and icacls do when changing access rights, when moving directories the security information must be reset also on everything inside it, recursively.
Code: Select all
11:40:21,0826964 salamand.exe 4516 SetRenameInformationFile D:\users\ether\testfile SUCCESS ReplaceIfExists: False, FileName: D:\users\ether\temporary\dropbox\testfile
11:40:33,6525376 salamand.exe 4516 SetRenameInformationFile D:\users\ether\temporary\dropbox\testfile SUCCESS ReplaceIfExists: False, FileName: D:\users\ether\testfile
11:40:42,6317710 explorer.exe 5908 SetRenameInformationFile D:\users\ether\testfile SUCCESS ReplaceIfExists: False, FileName: D:\users\ether\temporary\dropbox\testfile
11:40:42,6346747 explorer.exe 5908 SetSecurityFile D:\users\ether\temporary\dropbox\testfile SUCCESS Information: DACL, DACL Unprotected
11:40:46,0793524 explorer.exe 5908 SetRenameInformationFile D:\users\ether\temporary\dropbox\testfile SUCCESS ReplaceIfExists: False, FileName: D:\users\ether\testfile
11:40:46,0823213 explorer.exe 5908 SetSecurityFile D:\users\ether\testfile SUCCESS Information: DACL, DACL Unprotected