Maintain File and Folder Permissions Inside Archives

Maintain file and folder permissions inside archives

zip does not store file permissions in the archive.

tar archives will preserve file permissions on Linux and OS X. I have no idea what happens on Windows. If you can test things out on Windows and it works, this is probably your best bet. It probably depends on what tool people use to unpack the archives.

Another option would be to create an installer, although there are few non-commercial options for creating cross-platform installers. Wikipedia has a list.

Maintain sub-folder and files permission as in source: puppet

The file resource has the attribute source_permissions. So you could do something like this:

file { '/some/where':
...
source_permissions => 'use', # or 'use_when_creating'
}

Folder permissions when zip and unzip on Windows

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

It works as:

robocopy {source} {destination} /COPY:DAT


Related Topics



Leave a reply



Submit