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

Add UnixFileOutputStream, UnixFile with permissions support

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • core-libs
    • None
    • sparc
    • solaris_9

      Current Java file support does not include support for specifying UNIX permissions on files and directories that are created.

      This leads to an easy pitfall for Java applications: they can easily create files or directories with permissions looser than they should be. I've just filed a P2 security bug against another Sun product the root cause of which was that it used the Java file support to create files and directories and did not take extra care to get their permissions set right. Particularly vexing is the fact that it's actually somewhat hard to do right - the best theory I've come up with is to create the file or directory using JNI or an external program run through Runtime.exec, and then write to it using core Java.

      Such Unix* classes might well live in com.sun.something, though it seems like 3rd parties will need these capabilities too.

            Unassigned Unassigned
            jordan Jordan Brown
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: