Strony

wtorek, 15 maja 2012

Backup and Restore ACL NTFS with SetACL

Przeniesienie uprawnień NTFS (DACL) pomiędzy zasobami:


Backup uprawnień NTFS z server1
SetACL.exe -on "\\server1\c$\test" -ot file -actn list -lst "f:sddl;w:d,o,g" -rec cont -bckp "d:\tmp\acl-ntfs.txt"

Edytuj plik "acl-ntfs.txt"
Zmień ścieżki UNC z "\\?\UNC\server1\c$\test" na "\\?\UNC\server2\c$\test"


Restore uprawnień NTFS na server2
SetACL.exe -on "\\server2\c$\test" -ot file -actn restore -bckp "d:\tmp\acl-ntfs.txt" -log "log.txt"

Jeśli chcesz wykonać backup i restore uprawnień na zasobie sieciowym (SACL) to w sekcji -lst trzeba dodać "s", czyli:
-lst "f:sddl;w:d,s,o,g"
 
Strona projektu:
http://sourceforge.net/projects/setacl/
http://helgeklein.com/

Źródła:
http://bog.no/index.php/artikler/2-how-to-backup-ntfs-acl