3

I am using Maven Assembly plugin to bundle my application along with configuration/settings files. It allows to specify persmissions to be stored along with files, which is quite convenient.

Still I never found a confirmation, that ZIP archive is capable of storing UNIX permissions. Is it? (please, post some proof if you answer either yes or no).

user1065145
  • 295
  • 4
  • 9
  • Surely this is easy to test yourself, create your deployment then erm deploy it in a lab and see what happens. – user9517 Apr 01 '14 at 08:12
  • 1
    I am always glad to proof something doing an experiment, but what I was looking for is a link to some standart or specification, CLEARLY STATING if it is possible or not. – user1065145 Apr 01 '14 at 08:43
  • Why don't _you_ read the zip specification then? – user9517 Apr 01 '14 at 08:53

2 Answers2

9

From the unzip(1) manpage:

   Dates,  times  and  permissions  of stored directories are not restored
   except under Unix. (On Windows NT and successors,  timestamps  are  now
   restored.)

So yes, permissions can be stored.

MikeyB
  • 39,291
  • 10
  • 105
  • 189
  • Hah! Funnily enough this made life Fun later on: https://github.com/terraform-providers/terraform-provider-archive/issues/53 – MikeyB Feb 06 '20 at 05:47
1

Yes,

  • Create you deployment.
  • Transfer it to another machine.
  • Deploy the application.
  • Compare the permissions on the reference machine with the lab machine.

Profit!

user9517
  • 115,471
  • 20
  • 215
  • 297