JDK-4171369 : unzip will mask off execute bit off of files/directories in jar file
  • Type: Bug
  • Component: tools
  • Sub-Component: jar
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 1998-09-04
  • Updated: 2006-12-14
  • Resolved: 2006-12-14
Related Reports
Duplicate :  
Description
If you inflate a 1.2 jar using the jar command, it sets the directory
permissions on Unix as follows:

drwxrwxr-x   2 rosanna  staff        113 Sep  3 22:58 META-INF/
drwxrwxr-x   3 rosanna  staff        108 Sep  3 22:58 javax/

However, if you inflate the same jar using 'unzip', you get

drw-rw-r--   2 rosanna  staff        113 Aug  7 15:10 META-INF/
drwxrwxr-x   3 rosanna  staff        108 Sep  3 22:57 javax/

The 'x' bit on the META-INF is not set. Is this as expected, or
is there some information missing in the ZIP entry for the META-INF
directory that prevents unzip from making the directory accessible
when inflated?

Comments
EVALUATION While unzip will restore file access modes, jar will not. So it's possible that the META-INF directory's mode when the jar file was created was actually drw-rw-r--. Closing as dup of more general bug.
14-12-2006

WORK AROUND chmod +x META-INF
11-06-2004

EVALUATION Using unzip to decompress jarred files will mask off the executable bit of owner, group and others, for both files and directories. Will dig into this. ###@###.### 1998-09-28
28-09-1998