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

java.io: Not relying on umask in open/create/mkdir

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.1.4, 1.1.5, 1.1.6, 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      1.2beta4
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.5, solaris_2.5.1

      Description

      The canonical implementation of creation in POSIX systems is to open with
      maximal permission (usually 777 or 666) and let umask clear what the user
      wants to clear. You should not assume that people want their files and/or
      directories protected or not protected from "other". Turn on all the bits
      and let umask sort 'em out.

      java_io_File_mkdir0 uses 771
      java_io_FileOutputStream_open uses 664
      java_io_FileOutputStream_openAppend uses 664
      java_io_RandomAccessFile_open users 664
      in src/share/sun/jio/jio.c, jio_open uses 644
      in src/solaris/doc/java/native/file.c, demo_OutputFile_open uses 644
      in src/solaris/java/javai/javai.c, OpenCode uses 644 twice
      in src/solaris/java/javap/javap.c, OpenCode uses 644
      in src/win32/bin/hotjava.c, main uses 644



      ken.arnold@East 1998-01-07

      This is still a problem, and is causing problems in our development environment where javac creates directories with the wrong mode. This is just not the right
      mapping for UNIX -- UNIX custom is to create with all reasonable permissions on and let umask sort it out. This is a simple thing to fix -- surely we can get it into 1.2?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              never Tom Rodriguez
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: