cosmoJFH commented on pull request #131:
URL: https://github.com/apache/commons-io/pull/131#issuecomment-666168635


   I just wanted to spot a change in the code FileUtils.copyFile introduced in 
version 2.7.
   
   In the example, a temporary file is made
   
           final  Path srcFile = Files.createTempFile("tmp-output", ".xml");
   
   and then is copied by the method FileUtils.copyFile:
   
           FileUtils.copyFile(srcFile.toFile(), path.toFile());
   
   We checked the permissions of the copied file:
   
   [OWNER_READ, OWNER_WRITE]
   
   
   
   If the same code is executed by version 2.6, the permissions for the copied 
file are different 
   
   [OTHERS_READ, OWNER_READ, OWNER_WRITE, GROUP_READ, GROUP_WRITE]
   
   The umask of our system is
   
   $ umask -S
   u=rwx,g=rwx,o=rx
   
   It looks like in version 2.6 the umask is used while in version 2.7 the 
permissions of the source file are kept. 
   We don't really know which version of the code is the correct one.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to