Red Hat Bugzilla – Bug 1446700
OpenJDK 7 native2ascii always creates an output file with file permission 600
Last modified: 2017-08-01 03:31:55 EDT
### Description of problem:
OpenJDK 7 native2ascii always creates an output file with file permission 600. It should follow umask setting.
A same issue was reported in JDK bug database and already fixed:
Note that this issue does not exist in OpenJDK 6 and OpenJDK on RHEL 7 but it exists in OpenJDK 7 on RHEL 7. As far as I checked source code in src rpm, it looks OpenJDK 7 does not contain the above fix. Please backport the fix.
### Version-Release number of selected component (if applicable):
### How reproducible:
### Steps to Reproduce:
1. Create an input file:
2. Execute OpenJDK 7's native2ascii against the file:
/usr/lib/jvm/java-1.7.0-openjdk/bin/native2ascii inputfile-test.txt outputfile-test.txt
3. Check the files' permissions:
ls -l inputfile-test.txt outputfile-test.txt
### Actual results:
The permission of the output file does not follow umask setting. It's always 600.
### Expected results:
The permission of the output file should follow umask setting. For example, if umask is 022, it should be 644.
> Note that this issue does not exist in OpenJDK 6 and OpenJDK on RHEL 7 but
> it exists in OpenJDK 7 on RHEL 7.
Correction. I meant "Note that this issue does not exist in OpenJDK 6 and OpenJDK **8** on RHEL 7 but it exists in OpenJDK 7 on RHEL 7."
$ ls -l inputfile-test.txt outputfile-test.txt
-rw-r--r-- 1 andrew users 0 May 4 17:41 inputfile-test.txt
-rw------- 1 andrew users 0 May 4 17:41 outputfile-test.txt
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.