# Folder permissions when zip and unzip on Windows

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.

-

## migrated from stackoverflow.comAug 16 '11 at 0:39

This question came from our site for professional and enthusiast programmers.

WinRAR might help as it also handles alternate data streams. –  Heinrich Ulbricht Aug 15 '11 at 16:01
Use software made for backups rather than relying on zip. –  Mark Ransom Aug 15 '11 at 16:10
I havent got winrar and i cant install any software, its a production server and another company has to do the deployment. –  Leandro Aug 15 '11 at 16:29

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 WinVista 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.

-

I used robocopy, its a cmd application that i can run and comes with Windows.

Its work with robocopy source destination /COPY:DAT

-