My last post had an incorrect command line, do NOT use it. instead use this modified script.
Remember: This script sets the owner to Administrators, removes all custom file permissions, and sets the "inherit from parent" flag of the CONTENTS of the directory you set in %foo% without modifying the permissions of %foo%
Code:
SET foo=D:\data
SetACL.exe -silent -on "%foo%\*" -ot file -actn setprot -op "dacl:np;sacl:np" -rec cont_obj -actn setowner -ownr "n:S-1-5-32-544;s:y" -actn clear -clr "dacl,sacl"
Bookmarks