There are several ways to do this:
The easiest way is to use powershell command:
1 | get-acl \SOURCE/FOLDER | set-acl \TARGETFOLDER |
You can also use iCACLS to backup the permission to a file and restore it.
1 2 3 4 | #backup icacls d:data /save ntfsperms.txt #restore icacls d: /restore ntfsperms.txt |
Note: icacls doesn’t support restore drive root permission
nice article