How to influence File Permission Mode
Medi Montaseri
medi.montaseri at hds.com
Tue Sep 2 19:35:17 UTC 2014
Hi Erik,
Sorry for a bit of delay, got task switched around...
My umask seems to be ok ( it is 0002 ) and I see the same issue under Debian (user=mmontaseri, umask=0002) and CentOS (user=manager, umask=0002)
mmontaseri at griffin:/tmp> touch joe ; ls -l joe
-rw-rw-r-- 1 mmontaseri software 0 Sep 2 11:47 joe
mmontaseri at griffin:/tmp> mkdir moe ; ls -ld moe
drwxrwxr-x 2 mmontaseri software 4096 Sep 2 11:47 moe/
I see a few chmod(1)-ing and umask(1)-ing in the build scripts.
build-performance.m4: chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
generated-configure.sh:$CHMOD +x $OUTPUT_ROOT/compare.sh
autoconf/generated-configure.sh: tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
autoconf/generated-configure.sh: (umask 077 && mkdir "$tmp")
autoconf/build-performance.m4: # with other users. Thus change the umask.
autoconf/build-performance.m4: SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
Can you please take a quick look and see....maybe cross-check that with the following area
> tar -zvtf openjdk-1.8.0-jre-20140822.debian.tgz | grep '^-rw-------'
> -rw------- root/root 617946 2014-08-22 11:38 ./lib/jsse.jar
> -rw------- root/root 259148 2014-08-22 11:38 ./lib/ext/sunjce_provider.jar
> -rw------- root/root 8286 2014-08-22 11:38 ./lib/ext/dnsns.jar
> -rw------- root/root 1589693 2014-08-22 11:38 ./lib/ext/nashorn.jar
I see "nashorn" as something worth chasing...
Thanks
Medi
________________________________________
From: Erik Joelsson [erik.joelsson at oracle.com]
Sent: Wednesday, August 27, 2014 1:09 AM
To: Medi Montaseri; build-dev at openjdk.java.net
Subject: Re: How to influence File Permission Mode
Hello Medi,
The build does not intentionally limit file read permissions on the
built files. There are some instances where write is removed. Have you
checked your umask?
/Erikl
On 2014-08-26 19:55, Medi Montaseri wrote:
> Hi
>
> I am seeing some files with permission 0600 (-rw --- --- ) in my build. Is there a way to influence the generated files' permission from the configure or do I need to run a chmod(1) on them myself.
> Note that I have selected owner=root , group=root, so the net effect is that those files with 0600 only works for root. I need it to be readable by all. Unless there is some specific reason why these JARs are 0600.
>
> mmontaseri at griffin:~/work/bug-91383/depot9> ls -1
> bin/
> jvm/
> openjdk-1.8.0-jdk-20140822.debian.tgz
> openjdk-1.8.0-jre-20140822.debian.tgz
> mmontaseri at griffin:~/work/bug-91383/depot9> bin/javac -version
> javac 1.8.0-20140822
>
> mmontaseri at griffin:~/work/bug-91383/depot9/jvm/openjdk-1.8.0-20140822> find . -perm 600
> ./demo/scripting/jconsole-plugin/jconsole-plugin.jar
> ./demo/jfc/Metalworks/Metalworks.jar
> ./demo/jfc/FileChooserDemo/FileChooserDemo.jar
> ./demo/jfc/SwingApplet/SwingApplet.jar
> ./demo/jfc/Notepad/Notepad.jar
> ./demo/jfc/TransparentRuler/TransparentRuler.jar
> ./demo/jfc/TableExample/TableExample.jar
> ./demo/jfc/SampleTree/SampleTree.jar
> ./demo/jfc/Font2DTest/Font2DTest.jar
> ./demo/jfc/CodePointIM/CodePointIM.jar
> ./demo/jpda/examples.jar
> ./demo/management/MemoryMonitor/MemoryMonitor.jar
> ./demo/management/FullThreadDump/FullThreadDump.jar
> ./demo/management/VerboseGC/VerboseGC.jar
> ./demo/management/JTop/JTop.jar
> ./demo/nio/zipfs/zipfs.jar
> ./demo/applets/WireFrame/WireFrame.jar
> ./demo/applets/MoleculeViewer/MoleculeViewer.jar
> ./demo/jvmti/mtrace/mtrace.jar
> ./demo/jvmti/heapTracker/heapTracker.jar
> ./demo/jvmti/minst/minst.jar
> ./lib/ct.sym
> ./lib/tools.jar
> ./lib/sa-jdi.jar
> ./lib/jconsole.jar
> ./lib/dt.jar
> ./jre/lib/jsse.jar
> ./jre/lib/ext/sunjce_provider.jar
> ./jre/lib/ext/dnsns.jar
> ./jre/lib/ext/zipfs.jar
> ./jre/lib/ext/nashorn.jar
> ./jre/lib/ext/sunec.jar
> ./jre/lib/ext/sunpkcs11.jar
> ./jre/lib/ext/cldrdata.jar
> ./jre/lib/ext/localedata.jar
> ./jre/lib/security/US_export_policy.jar
> ./jre/lib/security/local_policy.jar
> ./jre/lib/jce.jar
> ./jre/lib/charsets.jar
>
> mmontaseri at griffin:~/work/bug-91383/depot9/jvm/openjdk-1.8.0-20140822/jre/lib> find . -perm 600 -ls
> 67241378 608 -rw------- 1 mmontaseri software 617946 Aug 22 11:38 ./jsse.jar
> 67297842 260 -rw------- 1 mmontaseri software 259148 Aug 22 11:38 ./ext/sunjce_provider.jar
> 67297843 12 -rw------- 1 mmontaseri software 8286 Aug 22 11:38 ./ext/dnsns.jar
> 67297844 72 -rw------- 1 mmontaseri software 68844 Aug 22 11:38 ./ext/zipfs.jar
> 67297845 1560 -rw------- 1 mmontaseri software 1589693 Aug 22 11:38 ./ext/nashorn.jar
> 67297846 36 -rw------- 1 mmontaseri software 35899 Aug 22 11:38 ./ext/sunec.jar
> 67297848 236 -rw------- 1 mmontaseri software 235457 Aug 22 11:38 ./ext/sunpkcs11.jar
> 67297849 3776 -rw------- 1 mmontaseri software 3860522 Aug 22 11:38 ./ext/cldrdata.jar
> 67297850 1156 -rw------- 1 mmontaseri software 1178765 Aug 22 11:38 ./ext/localedata.jar
> 67346443 4 -rw------- 1 mmontaseri software 620 Aug 22 11:38 ./security/US_export_policy.jar
> 67346444 4 -rw------- 1 mmontaseri software 1040 Aug 22 11:38 ./security/local_policy.jar
> 67241387 96 -rw------- 1 mmontaseri software 93130 Aug 22 11:38 ./jce.jar
> 67241393 3064 -rw------- 1 mmontaseri software 3131343 Aug 22 11:38 ./charsets.jar
>
> Here is another way of showing this....lets say I have my JRE packaged up in a tar file
>
> tar -zvtf openjdk-1.8.0-jre-20140822.debian.tgz | grep '^-rw-------'
> -rw------- root/root 617946 2014-08-22 11:38 ./lib/jsse.jar
> -rw------- root/root 259148 2014-08-22 11:38 ./lib/ext/sunjce_provider.jar
> -rw------- root/root 8286 2014-08-22 11:38 ./lib/ext/dnsns.jar
> -rw------- root/root 68844 2014-08-22 11:38 ./lib/ext/zipfs.jar
> -rw------- root/root 1589693 2014-08-22 11:38 ./lib/ext/nashorn.jar
> -rw------- root/root 35899 2014-08-22 11:38 ./lib/ext/sunec.jar
> -rw------- root/root 235457 2014-08-22 11:38 ./lib/ext/sunpkcs11.jar
> -rw------- root/root 3860522 2014-08-22 11:38 ./lib/ext/cldrdata.jar
> -rw------- root/root 1178765 2014-08-22 11:38 ./lib/ext/localedata.jar
> -rw------- root/root 620 2014-08-22 11:38 ./lib/security/US_export_policy.jar
> -rw------- root/root 1040 2014-08-22 11:38 ./lib/security/local_policy.jar
> -rw------- root/root 93130 2014-08-22 11:38 ./lib/jce.jar
> -rw------- root/root 3131343 2014-08-22 11:38 ./lib/charsets.jar
>
More information about the build-dev
mailing list