JDK-4124477 : java.io.File mkdir makes directories with mode 771 - should be 775
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 1.1.5,1.1.6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1998-03-31
  • Updated: 1998-03-31
  • Resolved: 1998-03-31
Related Reports
Duplicate :  
Relates :  
Description
Directories created by java.io.File mkdir() end up with 771 permissions rather than with 775. As a result (without any APIs to change permissions or ownership) these directories are not readable by others.

Bug 1208027 seems to indicate that this change was made -- but in fact it has not and 1.1.6 still has 771 instead of 775 -- seems like an easy fix.

Comments
SUGGESTED FIX Change src/share/java/lang/filesystem.c--java_io_File_mkdir0 to use 775 instead of 771. The real fix would be to honor the umask setting.
11-06-2004