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

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

XMLWordPrintable

    • 1.2beta4
    • generic, sparc
    • generic, solaris_2.5, solaris_2.5.1

      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?

            never Tom Rodriguez
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: