Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
### 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:
https://bugs.openjdk.java.net/browse/JDK-7177216http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/819258b5002ehttp://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/e50c9a5f001chttp://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/0e34d4326386
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):
java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el7_3.x86_64
java-1.7.0-openjdk-devel-1.7.0.131-2.6.9.0.el7_3.x86_64
### How reproducible:
Anytime
### Steps to Reproduce:
1. Create an input file:
touch inputfile-test.txt
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."
Comment 2Andrew John Hughes
2017-05-04 16:42:33 UTC
Confirmed:
$ 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.
https://access.redhat.com/errata/RHBA-2017:2287
### 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: https://bugs.openjdk.java.net/browse/JDK-7177216 http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/819258b5002e http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/e50c9a5f001c http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/0e34d4326386 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): java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el7_3.x86_64 java-1.7.0-openjdk-devel-1.7.0.131-2.6.9.0.el7_3.x86_64 ### How reproducible: Anytime ### Steps to Reproduce: 1. Create an input file: touch inputfile-test.txt 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.