windows - Copying file security permissions -
i'm copying file folder folder b , trying copy file permissions. here basic steps i'm using:
- copyfile(source, target)
- getnamedsecurityinfo(source, group_security_information | dacl_security_information)
- print source sd using convertsecuritydescriptortostringsecuritydescriptor
- setnamedsecurityinfo(target, group_security_information | dacl_security_information)
- getnamedsecurityinfo(target, group_security_information | dacl_security_information)
- print target sd using convertsecuritydescriptortostringsecuritydescriptor
at #3 sd:
g:s-1-5-21-1454471165-1482476501-839522115-513d:ai(a;id;0x1200a9;;;bu)(a;id;0x1301bf;;;pu)(a;id;fa;;;ba)(a;id;fa;;;sy)(a;id;fa;;;s-1-5-21-1454471165-1482476501-839522115-1004)
at #6 get
g:s-1-5-21-1454471165-1482476501-839522115-513d:ai(a;id;0x1301bf;;;pu)(a;id;fa;;;ba)(a;id;fa;;;sy)
the call setnamedsecurityinfo returns error_success, yet results source , target file not have same sds. why that? doing wrong here?
shfileoperation
can copy files security attributes, your other question see you're concerned won't work within service. maybe following newsgroup discussions provide useful information you:
Comments
Post a Comment