[ https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734332&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734332 ]
ASF GitHub Bot logged work on HADOOP-18145: ------------------------------------------- Author: ASF GitHub Bot Created on: 01/Mar/22 03:59 Start Date: 01/Mar/22 03:59 Worklog Time Spent: 10m Work Description: 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 permissions, 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 734332) Time Spent: 1h 20m (was: 1h 10m) > Fileutil's unzip method causes unzipped files to lose their original > permissions > -------------------------------------------------------------------------------- > > Key: HADOOP-18145 > URL: https://issues.apache.org/jira/browse/HADOOP-18145 > Project: Hadoop Common > Issue Type: Bug > Components: common > Affects Versions: 2.7.2 > Reporter: jingxiong zhong > Priority: Major > Labels: pull-request-available > Time Spent: 1h 20m > Remaining Estimate: 0h > > When Spark decompresses the zip file, if the original file has the executable > permission, but the unzip method of FileUtil is invoked, the decompressed > file loses the executable permission, we should save the original permission -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org