Review Request: JDK-8173096 jmod files are not world-readable

Peter Levart peter.levart at
Sun Jan 22 11:17:13 UTC 2017

Hi Mandy,

On 01/21/2017 03:32 AM, Mandy Chung wrote:
> Updated webrev to put the temporary file in the same containing directory of the target file:

That's ok. Maybe also specify ATOMIC_MOVE to CopyOption ... options in 
Files.move() ? Currently the move will be atomic (rename in UNIX 
terminology) because the source and target are in the same directory, 
but if renaming fails for some reason, it will try the fallback to 
copy(src, dst) + remove(src). If you add ATOMIC_MOVE to options, failure 
to rename will result in exception. I don't know which one do you prefer?

Regards, Peter

> I want to fix this regression in jdk-9+154.  We can revisit the approach after this fix if necessary.
> Mandy
>> On Jan 20, 2017, at 8:55 AM, Mandy Chung <mandy.chung at> wrote:
>> Webrev:
>> A recent change in jmod tool [1] creates the JMOD file with no group
>> and other readable permission as that’s the default permission when
>> creating a temporary file with Files::createTempFile.  This fixes
>> the permission issue by creating the JMOD file in a temporary directory.
>> Mandy
>> [1]

More information about the jigsaw-dev mailing list