Windows – Folder permissions when zip and unzip on Windows

backupcompressionfile-permissionsSecuritywindows

I've a webserver Windows 2003. When I do a backup in a zip of some folders, the permissions of the folder doesnt restore when i unzip the compress file. How can I do a zip saving the original permissions or how can i do a backup with all permissions keep intact?

I cant install any software, its a production server.

Best Answer

You can do it with a two-step process. If that 2003 server has SP2 on it, you have access to the icacls utility. With that you can run:

icacls f:\inetpub\wwwhome\* /save f:\backups\rights-acls.txt /t /c
[zip f:\inetpub\wwwhome\

That will create a file with all of the rights stored in it, keep it with the zip. To restore

[unzip the file to the target]
icacls f:\inetpub\wwwhome /restore f:\backups\rights-acls.txt 

If you don't have icacls on the system, there isn't much help. Happily, icacls is included on Windows Vista and higher, so if you can access the data via a mapped drive, you can run it from the client-side and drop the file where you need it.