Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7177216

native2ascii changes file permissions of input file

    XMLWordPrintable

Details

    • b01
    • b32
    • generic, x86
    • generic, linux_redhat_5.0
    • Verified

    Backports

      Description

        There is different behavior in native2ascii between 6u32 and 6u33.

        CONFIGURATION :
        JDK : 6u33
        OS :RHEL5/Solaris10

        REPRODUCE:
        1. run "umask 022"
        2. run "native2ascii text-file new-file"
        You can see the different permission between text-file and new-file.
        even if the permission of text-file is 644, that of new-file is 600.

        EXAMPLE OPERATION:
        -----
        jle-esxi-redhat:/home/tbaba 142 % ls -l native.txt
        -rw-r--r--+ 1 tbaba javasoft 0 Jun 14 16:42 native.txt
        jle-esxi-redhat:/home/tbaba 143 % native2ascii native.txt ascii.txt
        jle-esxi-redhat:/home/tbaba 144 % ls -l native.txt ascii.txt
        -rw-------+ 1 tbaba javasoft 0 Jun 14 17:03 ascii.txt
        -rw-r--r--+ 1 tbaba javasoft 0 Jun 14 16:42 native.txt
        jle-esxi-redhat:/home/tbaba 145 % java -version
        java version "1.6.0_33"
        Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
        Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
        jle-esxi-redhat:/home/tbaba 146 %
        -----

        In jdk6u32, the permission of created new text(ascii) file
        is not changed, it is still 644.
        -------
        jle-esxi-redhat:/home/tbaba 117 % ls -l native.txt
        -rw-r--r--+ 1 tbaba javasoft 0 Jun 14 16:42 native.txt
        jle-esxi-redhat:/home/tbaba 118 % native2ascii native.txt ascii.txt
        jle-esxi-redhat:/home/tbaba 119 % ls -l ascii.txt
        -rw-r--r--+ 1 tbaba javasoft 0 Jun 14 17:00 ascii.txt
        jle-esxi-redhat:/home/tbaba 120 % java -version
        java version "1.6.0_32"
        Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
        Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)
        jle-esxi-redhat:/home/tbaba 121 %
        ------

        Attachments

          Issue Links

            Activity

              People

                mbankal Mala Bankal (Inactive)
                tbaba Tadayuki Baba (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: