zhongjingxiong commented on a change in pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r816431564
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##########
@@ -667,6 +670,9 @@ public static void unZip(InputStream inputStream, File
toDir)
if (!file.setLastModified(entry.getTime())) {
numOfFailedLastModifiedSet++;
}
+ if (entry.getPlatform() == ZipArchiveEntry.PLATFORM_UNIX) {
+ Files.setPosixFilePermissions(file.toPath(),
permissionsFromMode(entry.getUnixMode()));
Review comment:
If you fail, then leave the default permissions, also is not executable
permissions, but for a Linux system, decompression process is going to this
logic, if it is a Windows platform, you will skip this logic, because the
window system is not using the Unix executable permission , this is also
consistent with the original way of relaxation.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]