java.io/202: File creation doesn't observe umask
Tom Tromey
tromey@cygnus.com
Sat Apr 15 19:50:00 GMT 2000
The following reply was made to PR java.io/202; it has been noted by GNATS.
From: Tom Tromey <tromey@cygnus.com>
To: Bryce McKinlay <bryce@albatross.co.nz>
Cc: tromey@cygnus.com, java-gnats@sourceware.cygnus.com
Subject: Re: java.io/202: File creation doesn't observe umask
Date: Sat, 15 Apr 2000 19:46:03 -0700 (PDT)
>> Classes that create OS files (i.e. java.io.FileOutputStream)
>> do not obey the user's current umask. Files are always
>> created with permissions -rw-r--r-- regardless of the user's
>> umask setting.
Bryce> umask is being honored, but we're creating files with the
Bryce> wrong mode (so changing umask from 022 to 000 appears to have
Bryce> no effect). The following patch should fix that. OK to commit?
When I try a simple test program with Sun's JDK (1.1.7, I think), with
my umask set to 000, it creates a file with mode 0664. Do you know
what JDK 1.2 does? I think it makes sense to be JDK compatible here.
(When I wrote this code I didn't run a test -- I just picked what I
thought would be reasonable.)
Tom
More information about the Java-prs
mailing list