[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=750125=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-750125
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 30/Mar/22 13:53
Start Date: 30/Mar/22 13:53
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1077529427


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 54s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  35m 58s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 41s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  compile  |  21m  0s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  0s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 37s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 11s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 40s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m 26s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 46s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m  1s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 56s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javac  |  23m 56s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  21m  2s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  21m  2s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 58s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/14/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 60 
unchanged - 0 fixed = 62 total (was 60)  |
   | +1 :green_heart: |  mvnsite  |   1m 35s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  5s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 41s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 39s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  25m 23s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  17m 44s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 50s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 213m 33s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/14/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux 49ac92c75ee7 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 
06:54:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / eb83019dbe1e8cc743cbd860b2e0dcd287bb6ab2 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=750123=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-750123
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 30/Mar/22 13:52
Start Date: 30/Mar/22 13:52
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1082701135






-- 
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: 750123)
Time Spent: 10h 20m  (was: 10h 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
>Assignee: jingxiong zhong
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.3.3
>
>  Time Spent: 10h 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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=750050=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-750050
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 30/Mar/22 12:15
Start Date: 30/Mar/22 12:15
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1083065963


   Thanks for your guidance.
   
It is necessary to be strict with the code. I look forward to cooperating 
with you next time.


-- 
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: 750050)
Time Spent: 10h 10m  (was: 10h)

> 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
>Assignee: jingxiong zhong
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.3.3
>
>  Time Spent: 10h 10m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=750045=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-750045
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 30/Mar/22 11:54
Start Date: 30/Mar/22 11:54
Worklog Time Spent: 10m 
  Work Description: steveloughran commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1083046153


   +1.
   
   merged to trunk and cherrypicked into branch-3.3.
   
   thanks!
   
   sorry for being so rigorous here but we have to worry about security in the 
code which expands and then executes artifacts; unzip is a source of CVEs 
across many applications


-- 
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: 750045)
Time Spent: 10h  (was: 9h 50m)

> 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: 10h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=750035=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-750035
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 30/Mar/22 11:43
Start Date: 30/Mar/22 11:43
Worklog Time Spent: 10m 
  Work Description: steveloughran merged pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036


   


-- 
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: 750035)
Time Spent: 9h 50m  (was: 9h 40m)

> 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: 9h 50m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=749898=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-749898
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 30/Mar/22 07:01
Start Date: 30/Mar/22 07:01
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1082701135


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 55s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  1s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  37m 53s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  28m 54s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  compile  |  24m  6s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  8s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 50s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 19s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 46s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 55s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  26m 47s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  27m 10s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m  9s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  27m 46s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javac  |  27m 46s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 47s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  23m 47s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   1m  3s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/17/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 4 new + 60 
unchanged - 0 fixed = 64 total (was 60)  |
   | +1 :green_heart: |  mvnsite  |   1m 46s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m 13s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 44s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   3m 10s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  27m  3s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  18m 43s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 53s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 234m 44s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/17/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux 4902f4d06af0 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 
11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 90bb4aa47a7cdc1e6482a466ac1498ba7e7e3e21 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  Test 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=749812=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-749812
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 30/Mar/22 03:04
Start Date: 30/Mar/22 03:04
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r838076156



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -773,26 +773,64 @@ public void testCreateLocalTempFile() throws IOException {
   public void testUnZip() throws Exception {
 // make sa simple zip
 final File simpleZip = new File(del, FILE);
-OutputStream os = new FileOutputStream(simpleZip); 
-ZipOutputStream tos = new ZipOutputStream(os);
-try {
-  ZipEntry ze = new ZipEntry("foo");
-  byte[] data = "some-content".getBytes("UTF-8");
-  ze.setSize(data.length);
-  tos.putNextEntry(ze);
-  tos.write(data);
-  tos.closeEntry();
+try (OutputStream os = new FileOutputStream(simpleZip);
+ ZipArchiveOutputStream tos = new ZipArchiveOutputStream(os)) {
+  List ZipArchiveList = new ArrayList<>(7);
+  int count = 0;
+  // create 7 files to verify permissions
+  for (int i = 0; i < 7; i++) {
+ZipArchiveList.add(new ZipArchiveEntry("foo_" + i));
+ZipArchiveEntry archiveEntry = ZipArchiveList.get(i);
+archiveEntry.setUnixMode(count += 0100);
+byte[] data = "some-content".getBytes("UTF-8");
+archiveEntry.setSize(data.length);
+tos.putArchiveEntry(archiveEntry);
+tos.write(data);
+  }
+  tos.closeArchiveEntry();
   tos.flush();
   tos.finish();
-} finally {
-  tos.close();
 }
-
+
 // successfully unzip it into an existing dir:
 FileUtil.unZip(simpleZip, tmp);
 // check result:
-Verify.exists(new File(tmp, "foo"));
-assertEquals(12, new File(tmp, "foo").length());
+assertTrue(new File(tmp, "foo_0").exists());

Review comment:
   Sure, that's done.




-- 
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: 749812)
Time Spent: 9.5h  (was: 9h 20m)

> 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: 9.5h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=749403=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-749403
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 29/Mar/22 15:40
Start Date: 29/Mar/22 15:40
Worklog Time Spent: 10m 
  Work Description: steveloughran commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r837628148



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -773,26 +773,64 @@ public void testCreateLocalTempFile() throws IOException {
   public void testUnZip() throws Exception {
 // make sa simple zip
 final File simpleZip = new File(del, FILE);
-OutputStream os = new FileOutputStream(simpleZip); 
-ZipOutputStream tos = new ZipOutputStream(os);
-try {
-  ZipEntry ze = new ZipEntry("foo");
-  byte[] data = "some-content".getBytes("UTF-8");
-  ze.setSize(data.length);
-  tos.putNextEntry(ze);
-  tos.write(data);
-  tos.closeEntry();
+try (OutputStream os = new FileOutputStream(simpleZip);
+ ZipArchiveOutputStream tos = new ZipArchiveOutputStream(os)) {
+  List ZipArchiveList = new ArrayList<>(7);
+  int count = 0;
+  // create 7 files to verify permissions
+  for (int i = 0; i < 7; i++) {
+ZipArchiveList.add(new ZipArchiveEntry("foo_" + i));
+ZipArchiveEntry archiveEntry = ZipArchiveList.get(i);
+archiveEntry.setUnixMode(count += 0100);
+byte[] data = "some-content".getBytes("UTF-8");
+archiveEntry.setSize(data.length);
+tos.putArchiveEntry(archiveEntry);
+tos.write(data);
+  }
+  tos.closeArchiveEntry();
   tos.flush();
   tos.finish();
-} finally {
-  tos.close();
 }
-
+
 // successfully unzip it into an existing dir:
 FileUtil.unZip(simpleZip, tmp);
 // check result:
-Verify.exists(new File(tmp, "foo"));
-assertEquals(12, new File(tmp, "foo").length());
+assertTrue(new File(tmp, "foo_0").exists());

Review comment:
   can you assign each of these to a variable and reuse in the assertions? 
there's a lot of duplication




-- 
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: 749403)
Time Spent: 9h 20m  (was: 9h 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: 9h 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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=749312=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-749312
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 29/Mar/22 12:59
Start Date: 29/Mar/22 12:59
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1080751869


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 54s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  2s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  36m  7s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 49s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  compile  |  21m  6s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  1s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 39s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m  8s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 45s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m 38s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 59s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m  1s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  24m  1s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javac  |  24m  1s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  21m  9s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  21m  9s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 59s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/15/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 60 
unchanged - 0 fixed = 62 total (was 60)  |
   | +1 :green_heart: |  mvnsite  |   1m 36s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  5s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 40s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 41s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  25m 31s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  17m 55s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 48s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 214m 35s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/15/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux d95296821707 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 
06:54:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 3f43d54b7ce4c5a9fe40a148cdd18d80520e4d44 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=749257=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-749257
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 29/Mar/22 10:25
Start Date: 29/Mar/22 10:25
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1081699972


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 55s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  37m 49s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  29m 24s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  compile  |  24m  3s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  5s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 51s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 18s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 49s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 57s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  26m 36s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  26m 59s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m 10s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  27m 50s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javac  |  27m 50s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  24m 26s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  24m 26s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   1m  6s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/16/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 4 new + 60 
unchanged - 0 fixed = 64 total (was 60)  |
   | +1 :green_heart: |  mvnsite  |   1m 49s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m 13s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 47s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   3m  3s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  26m 33s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  18m 45s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 54s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 235m 24s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/16/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux ce7d163f98b6 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 
11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 0ecf06e77040751e3546a0416ee6bbb15c7fddea |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  Test 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748672=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748672
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 14:49
Start Date: 28/Mar/22 14:49
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1080751869


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 54s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  2s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  36m  7s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 49s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  compile  |  21m  6s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  1s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 39s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m  8s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 45s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m 38s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 59s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m  1s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  24m  1s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javac  |  24m  1s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  21m  9s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  21m  9s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 59s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/15/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 60 
unchanged - 0 fixed = 62 total (was 60)  |
   | +1 :green_heart: |  mvnsite  |   1m 36s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  5s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 40s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 41s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  25m 31s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  17m 55s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 48s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 214m 35s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/15/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux d95296821707 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 
06:54:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 3f43d54b7ce4c5a9fe40a148cdd18d80520e4d44 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  Test 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748583=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748583
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 12:57
Start Date: 28/Mar/22 12:57
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1080612022


   ```java
   File tempFile = File.createTempFile("test-unzip", ".txt");
   
   Files.setPosixFilePermissions(tempFile.toPath(), permissionsFromMode(0700));
   UserPrincipalLookupService lookupService = 
FileSystems.getDefault().getUserPrincipalLookupService();
   GroupPrincipal groupPrincipal = 
lookupService.lookupPrincipalByGroupName("staff");
   UserPrincipal userPrincipal = lookupService.lookupPrincipalByName("cooper");
   PosixFileAttributeView view = Files.getFileAttributeView(tempFile.toPath(), 
PosixFileAttributeView.class);
   view.setGroup(groupPrincipal);
   readTargetPermission(tempFile.toPath());
   // This is going to fail because it's just a normal user
   view.setOwner(userPrincipal);
   
   readTargetPermission(tempFile.toPath());
   assertTrue("file lacks execute permissions", tempFile.canExecute());
   assertTrue("file lacks write permissions", tempFile.canWrite());
   assertTrue("file lacks read permissions", tempFile.canRead());```
   // I tried to change the current user, but failed.


-- 
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: 748583)
Time Spent: 8h 40m  (was: 8.5h)

> 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: 8h 40m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748581=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748581
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 12:55
Start Date: 28/Mar/22 12:55
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong edited a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1080612022


   ```java
   File tempFile = File.createTempFile("test-unzip", ".txt");
   
   Files.setPosixFilePermissions(tempFile.toPath(), permissionsFromMode(0700));
   UserPrincipalLookupService lookupService = 
FileSystems.getDefault().getUserPrincipalLookupService();
   GroupPrincipal groupPrincipal = 
lookupService.lookupPrincipalByGroupName("staff");
   UserPrincipal userPrincipal = lookupService.lookupPrincipalByName("cooper");
   PosixFileAttributeView view = Files.getFileAttributeView(tempFile.toPath(), 
PosixFileAttributeView.class);
   view.setGroup(groupPrincipal);
   readTargetPermission(tempFile.toPath());
   // This is going to fail because it's just a normal user
   view.setOwner(userPrincipal);
   
   readTargetPermission(tempFile.toPath());
   assertTrue("file lacks execute permissions", tempFile.canExecute());
   assertTrue("file lacks write permissions", tempFile.canWrite());
   assertTrue("file lacks read permissions", tempFile.canRead());```
   // I tried to change the current user, but failed.


-- 
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: 748581)
Time Spent: 8.5h  (was: 8h 20m)

> 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: 8.5h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748580=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748580
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 12:55
Start Date: 28/Mar/22 12:55
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong edited a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1080612022


   ```java
   File tempFile = File.createTempFile("test-unzip", ".txt");
   
   Files.setPosixFilePermissions(tempFile.toPath(), permissionsFromMode(0700));
   UserPrincipalLookupService lookupService = 
FileSystems.getDefault().getUserPrincipalLookupService();
   GroupPrincipal groupPrincipal = 
lookupService.lookupPrincipalByGroupName("staff");
   UserPrincipal userPrincipal = lookupService.lookupPrincipalByName("cooper");
   PosixFileAttributeView view = Files.getFileAttributeView(tempFile.toPath(), 
PosixFileAttributeView.class);
   view.setGroup(groupPrincipal);
   readTargetPermission(tempFile.toPath());
   // This is going to fail because it's just a normal user
   view.setOwner(userPrincipal);
   
   readTargetPermission(tempFile.toPath());
   assertTrue("file lacks execute permissions", tempFile.canExecute());
   assertTrue("file lacks write permissions", tempFile.canWrite());
   assertTrue("file lacks read permissions", tempFile.canRead());```
   > I tried to change the current user, but failed.


-- 
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: 748580)
Time Spent: 8h 20m  (was: 8h 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: 8h 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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748579=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748579
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 12:54
Start Date: 28/Mar/22 12:54
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong edited a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1080612022


   ```java
   File tempFile = File.createTempFile("test-unzip", ".txt");
   
   Files.setPosixFilePermissions(tempFile.toPath(), permissionsFromMode(0700));
   UserPrincipalLookupService lookupService = 
FileSystems.getDefault().getUserPrincipalLookupService();
   GroupPrincipal groupPrincipal = 
lookupService.lookupPrincipalByGroupName("staff");
   UserPrincipal userPrincipal = lookupService.lookupPrincipalByName("cooper");
   PosixFileAttributeView view = Files.getFileAttributeView(tempFile.toPath(), 
PosixFileAttributeView.class);
   view.setGroup(groupPrincipal);
   readTargetPermission(tempFile.toPath());
   // This is going to fail because it's just a normal user
   view.setOwner(userPrincipal);
   
   readTargetPermission(tempFile.toPath());
   assertTrue("file lacks execute permissions", tempFile.canExecute());
   assertTrue("file lacks write permissions", tempFile.canWrite());
   assertTrue("file lacks read permissions", tempFile.canRead());```
   I tried to change the current user, but failed.


-- 
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: 748579)
Time Spent: 8h 10m  (was: 8h)

> 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: 8h 10m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748578=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748578
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 12:53
Start Date: 28/Mar/22 12:53
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1080612022


   `File tempFile = File.createTempFile("test-unzip", ".txt");
   
   Files.setPosixFilePermissions(tempFile.toPath(), permissionsFromMode(0700));
   UserPrincipalLookupService lookupService = 
FileSystems.getDefault().getUserPrincipalLookupService();
   GroupPrincipal groupPrincipal = 
lookupService.lookupPrincipalByGroupName("staff");
   UserPrincipal userPrincipal = lookupService.lookupPrincipalByName("cooper");
   PosixFileAttributeView view = Files.getFileAttributeView(tempFile.toPath(), 
PosixFileAttributeView.class);
   view.setGroup(groupPrincipal);
   readTargetPermission(tempFile.toPath());
   // This is going to fail because it's just a normal user
   view.setOwner(userPrincipal);
   
   readTargetPermission(tempFile.toPath());
   assertTrue("file lacks execute permissions", tempFile.canExecute());
   assertTrue("file lacks write permissions", tempFile.canWrite());
   assertTrue("file lacks read permissions", tempFile.canRead());`
   I tried to change the current user, but failed.


-- 
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: 748578)
Time Spent: 8h  (was: 7h 50m)

> 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: 8h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748541=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748541
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 11:19
Start Date: 28/Mar/22 11:19
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r836318326



##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -677,6 +683,31 @@ public static void unZip(InputStream inputStream, File 
toDir)
 }
   }
 
+  public static Set permissionsFromMode(int mode) {
+EnumSet permissions =
+EnumSet.noneOf(PosixFilePermission.class);
+addPermissions(permissions, "OTHERS", (long) mode);
+addPermissions(permissions, "GROUP", (long) mode >> 3);
+addPermissions(permissions, "OWNER", (long) mode >> 6);
+return permissions;
+  }
+
+  /** Assign the original permissions to the file */

Review comment:
   Okay, that's done.




-- 
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: 748541)
Time Spent: 7h 50m  (was: 7h 40m)

> 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: 7h 50m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748538=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748538
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 11:15
Start Date: 28/Mar/22 11:15
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r836315696



##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -677,6 +683,31 @@ public static void unZip(InputStream inputStream, File 
toDir)
 }
   }
 
+  public static Set permissionsFromMode(int mode) {

Review comment:
   OK, I will add it. And I also make the package private.




-- 
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: 748538)
Time Spent: 7h 40m  (was: 7.5h)

> 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: 7h 40m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748505=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748505
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 09:43
Start Date: 28/Mar/22 09:43
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong edited a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1080420412


   Thank you for your review. @steveloughran 
   1.the design of this method is more redundant, but more clear, and I will 
improve it.
   2.the test case, I try to use UserPrincipalLookupService class to update the 
current user groups and others, to verify the current file permissions for user 
groups and others as a result, but for ordinary users, is impossible to 
setOwner operation, this leads to the current user can't change, to this, Do 
you have any good suggestions?
   > then the permissionsFromMode() method can be tested passing in permissions 
for users group and other only, e.g.
   


-- 
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: 748505)
Time Spent: 7.5h  (was: 7h 20m)

> 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: 7.5h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=748503=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748503
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Mar/22 09:34
Start Date: 28/Mar/22 09:34
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1080420412


   Thank you for your review. @steveloughran 
   1.the design of this method is more redundant, but more clear, and I will 
improve it.
   2.the test case, I try to use UserPrincipalLookupService class to update the 
current user groups and others, to verify the current file permissions for user 
groups and others as a result, but for ordinary users, is impossible to 
setOwner operation, this leads to the current user can't change, to this, Do 
you have any good suggestions?
   > 
   then the permissionsFromMode() method can be tested passing in permissions 
for users group and other only, e.g.
   


-- 
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: 748503)
Time Spent: 7h 20m  (was: 7h 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: 7h 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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-25 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=747798=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-747798
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 25/Mar/22 14:03
Start Date: 25/Mar/22 14:03
Worklog Time Spent: 10m 
  Work Description: steveloughran commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r835272119



##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -677,6 +683,31 @@ public static void unZip(InputStream inputStream, File 
toDir)
 }
   }
 
+  public static Set permissionsFromMode(int mode) {

Review comment:
   1. can you add some javadocs to say that these only deal with 
user/group/other and not suid
   2. can you make package scoped so it can be called in tests, but not by 
applications (so we don't have to maintain consistent behaviour forever)

##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -677,6 +683,31 @@ public static void unZip(InputStream inputStream, File 
toDir)
 }
   }
 
+  public static Set permissionsFromMode(int mode) {
+EnumSet permissions =
+EnumSet.noneOf(PosixFilePermission.class);
+addPermissions(permissions, "OTHERS", (long) mode);
+addPermissions(permissions, "GROUP", (long) mode >> 3);
+addPermissions(permissions, "OWNER", (long) mode >> 6);
+return permissions;
+  }
+
+  /** Assign the original permissions to the file */

Review comment:
   1. add params to javadoc and staqte that only bottom 7 bits are used
   2. make package private

##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -677,6 +683,31 @@ public static void unZip(InputStream inputStream, File 
toDir)
 }
   }
 
+  public static Set permissionsFromMode(int mode) {
+EnumSet permissions =
+EnumSet.noneOf(PosixFilePermission.class);
+addPermissions(permissions, "OTHERS", (long) mode);
+addPermissions(permissions, "GROUP", (long) mode >> 3);
+addPermissions(permissions, "OWNER", (long) mode >> 6);
+return permissions;
+  }
+
+  /** Assign the original permissions to the file */
+  public static void  addPermissions(
+  Set permissions,
+  String prefix,
+  Long mode) {

Review comment:
   nit, should be int




-- 
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: 747798)
Time Spent: 7h 10m  (was: 7h)

> 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: 7h 10m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=747136=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-747136
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 24/Mar/22 11:33
Start Date: 24/Mar/22 11:33
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1077529427


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 54s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  35m 58s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 41s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  compile  |  21m  0s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  0s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 37s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 11s |  |  trunk passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 40s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m 26s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 46s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m  1s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 56s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javac  |  23m 56s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  21m  2s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  21m  2s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 58s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/14/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 60 
unchanged - 0 fixed = 62 total (was 60)  |
   | +1 :green_heart: |  mvnsite  |   1m 35s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  5s |  |  the patch passed with JDK 
Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 41s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 39s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  25m 23s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  17m 44s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 50s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 213m 33s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/14/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux 49ac92c75ee7 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 
06:54:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / eb83019dbe1e8cc743cbd860b2e0dcd287bb6ab2 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.14+9-Ubuntu-0ubuntu2.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  Test 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=746997=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-746997
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 24/Mar/22 08:00
Start Date: 24/Mar/22 08:00
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r834016387



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -706,35 +706,40 @@ public void testCreateLocalTempFile() throws IOException {
   public void testUnZip() throws IOException {
 // make sa simple zip
 final File simpleZip = new File(del, FILE);
-OutputStream os = new FileOutputStream(simpleZip); 
-ZipOutputStream tos = new ZipOutputStream(os);
-try {
-  ZipEntry ze = new ZipEntry("foo");
-  byte[] data = "some-content".getBytes("UTF-8");
-  ze.setSize(data.length);
-  tos.putNextEntry(ze);
-  tos.write(data);
-  tos.closeEntry();
-  tos.flush();
-  tos.finish();
-} finally {
-  tos.close();
-}
-
-// successfully unzip it into an existing dir:
-FileUtil.unZip(simpleZip, tmp);
-// check result:
-assertTrue(new File(tmp, "foo").exists());
-assertEquals(12, new File(tmp, "foo").length());
-
-final File regularFile = new File(tmp, "QuickBrownFoxJumpsOverTheLazyDog");
-regularFile.createNewFile();
-assertTrue(regularFile.exists());
-try {
-  FileUtil.unZip(simpleZip, regularFile);
-  assertTrue("An IOException expected.", false);
-} catch (IOException ioe) {
-  // okay
+try (OutputStream os = new FileOutputStream(simpleZip);
+ ZipArchiveOutputStream tos = new ZipArchiveOutputStream(os)) {
+  try {
+ZipArchiveEntry ze = new  ZipArchiveEntry("foo");
+ze.setUnixMode(0555);
+byte[] data = "some-content".getBytes("UTF-8");
+ze.setSize(data.length);
+tos.putArchiveEntry(ze);
+tos.write(data);
+tos.closeArchiveEntry();
+tos.flush();
+tos.finish();
+  } finally {
+tos.close();
+  }
+
+  // successfully unzip it into an existing dir:
+  FileUtil.unZip(simpleZip, tmp);
+  // check result:
+  assertTrue(new File(tmp, "foo").exists());
+  assertEquals(12, new File(tmp, "foo").length());
+  assertTrue("file lacks execute permissions", new File(tmp, 
"foo").canExecute());
+  assertFalse("file has write permissions", new File(tmp, 
"foo").canWrite());
+  assertTrue("file lacks read permissions", new File(tmp, 
"foo").canRead());
+
+  final File regularFile = new File(tmp, 
"QuickBrownFoxJumpsOverTheLazyDog");
+  regularFile.createNewFile();
+  assertTrue(regularFile.exists());
+  try {

Review comment:
   The code for the latest branch has been merged.




-- 
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: 746997)
Time Spent: 6h 50m  (was: 6h 40m)

> 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: 6h 50m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=746995=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-746995
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 24/Mar/22 07:59
Start Date: 24/Mar/22 07: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_r834015838



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -706,35 +706,40 @@ public void testCreateLocalTempFile() throws IOException {
   public void testUnZip() throws IOException {
 // make sa simple zip
 final File simpleZip = new File(del, FILE);
-OutputStream os = new FileOutputStream(simpleZip); 
-ZipOutputStream tos = new ZipOutputStream(os);
-try {
-  ZipEntry ze = new ZipEntry("foo");
-  byte[] data = "some-content".getBytes("UTF-8");
-  ze.setSize(data.length);
-  tos.putNextEntry(ze);
-  tos.write(data);
-  tos.closeEntry();
-  tos.flush();
-  tos.finish();
-} finally {
-  tos.close();
-}
-
-// successfully unzip it into an existing dir:
-FileUtil.unZip(simpleZip, tmp);
-// check result:
-assertTrue(new File(tmp, "foo").exists());
-assertEquals(12, new File(tmp, "foo").length());
-
-final File regularFile = new File(tmp, "QuickBrownFoxJumpsOverTheLazyDog");
-regularFile.createNewFile();
-assertTrue(regularFile.exists());
-try {
-  FileUtil.unZip(simpleZip, regularFile);
-  assertTrue("An IOException expected.", false);
-} catch (IOException ioe) {
-  // okay
+try (OutputStream os = new FileOutputStream(simpleZip);
+ ZipArchiveOutputStream tos = new ZipArchiveOutputStream(os)) {
+  try {
+ZipArchiveEntry ze = new  ZipArchiveEntry("foo");
+ze.setUnixMode(0555);
+byte[] data = "some-content".getBytes("UTF-8");
+ze.setSize(data.length);
+tos.putArchiveEntry(ze);
+tos.write(data);
+tos.closeArchiveEntry();
+tos.flush();
+tos.finish();
+  } finally {
+tos.close();

Review comment:
   Let me modify that.




-- 
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: 746995)
Time Spent: 6h 40m  (was: 6.5h)

> 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: 6h 40m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=746981=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-746981
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 24/Mar/22 07:23
Start Date: 24/Mar/22 07:23
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong edited a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1077313810






-- 
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: 746981)
Time Spent: 6h 20m  (was: 6h 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: 6h 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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=746982=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-746982
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 24/Mar/22 07:23
Start Date: 24/Mar/22 07:23
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1077313260


   > 
   
   Yes, if I set the suid flag, the file will be executed with the same 
permissions as the owner of the executable file. I think it's dangerous. So, in 
the code, any file with a suid flag will end up with only executable permission 
+x, this is only about rwx permissions.


-- 
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: 746982)
Time Spent: 6.5h  (was: 6h 20m)

> 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: 6.5h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=746980=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-746980
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 24/Mar/22 07:22
Start Date: 24/Mar/22 07:22
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1077313810


   > Yes, if I set the suid flag, the file will be executed with the same 
permissions as the owner of the executable file. I think it's dangerous. So, in 
the code, any file with a suid flag will end up with only executable permission 
+x, this is only about rwx permissions.
   
   


-- 
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: 746980)
Time Spent: 6h 10m  (was: 6h)

> 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: 6h 10m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=746979=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-746979
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 24/Mar/22 07:21
Start Date: 24/Mar/22 07:21
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1077313260


   > 
   
   Yes, if I set the suid flag, the file will be executed with the same 
permissions as the owner of the executable file. I think it's dangerous. So, in 
the code, any file with a suid flag will end up with only executable permission 
+x, this is only about rwx permissions.


-- 
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: 746979)
Time Spent: 6h  (was: 5h 50m)

> 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: 6h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-22 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=745931=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-745931
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 22/Mar/22 16:46
Start Date: 22/Mar/22 16:46
Worklog Time Spent: 10m 
  Work Description: steveloughran commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r832391092



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -706,35 +706,40 @@ public void testCreateLocalTempFile() throws IOException {
   public void testUnZip() throws IOException {
 // make sa simple zip
 final File simpleZip = new File(del, FILE);
-OutputStream os = new FileOutputStream(simpleZip); 
-ZipOutputStream tos = new ZipOutputStream(os);
-try {
-  ZipEntry ze = new ZipEntry("foo");
-  byte[] data = "some-content".getBytes("UTF-8");
-  ze.setSize(data.length);
-  tos.putNextEntry(ze);
-  tos.write(data);
-  tos.closeEntry();
-  tos.flush();
-  tos.finish();
-} finally {
-  tos.close();
-}
-
-// successfully unzip it into an existing dir:
-FileUtil.unZip(simpleZip, tmp);
-// check result:
-assertTrue(new File(tmp, "foo").exists());
-assertEquals(12, new File(tmp, "foo").length());
-
-final File regularFile = new File(tmp, "QuickBrownFoxJumpsOverTheLazyDog");
-regularFile.createNewFile();
-assertTrue(regularFile.exists());
-try {
-  FileUtil.unZip(simpleZip, regularFile);
-  assertTrue("An IOException expected.", false);
-} catch (IOException ioe) {
-  // okay
+try (OutputStream os = new FileOutputStream(simpleZip);
+ ZipArchiveOutputStream tos = new ZipArchiveOutputStream(os)) {
+  try {
+ZipArchiveEntry ze = new  ZipArchiveEntry("foo");
+ze.setUnixMode(0555);
+byte[] data = "some-content".getBytes("UTF-8");
+ze.setSize(data.length);
+tos.putArchiveEntry(ze);
+tos.write(data);
+tos.closeArchiveEntry();
+tos.flush();
+tos.finish();
+  } finally {
+tos.close();

Review comment:
   this close will be automatic. if you make the reference on L710
   
   ```
   ZipArchiveOutputStream tos = new ZipArchiveOutputStream(new 
FileOutputStream(simpleZip))
   ```
   then everything will be lined up for automatic close

##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -706,35 +706,40 @@ public void testCreateLocalTempFile() throws IOException {
   public void testUnZip() throws IOException {
 // make sa simple zip
 final File simpleZip = new File(del, FILE);
-OutputStream os = new FileOutputStream(simpleZip); 
-ZipOutputStream tos = new ZipOutputStream(os);
-try {
-  ZipEntry ze = new ZipEntry("foo");
-  byte[] data = "some-content".getBytes("UTF-8");
-  ze.setSize(data.length);
-  tos.putNextEntry(ze);
-  tos.write(data);
-  tos.closeEntry();
-  tos.flush();
-  tos.finish();
-} finally {
-  tos.close();
-}
-
-// successfully unzip it into an existing dir:
-FileUtil.unZip(simpleZip, tmp);
-// check result:
-assertTrue(new File(tmp, "foo").exists());
-assertEquals(12, new File(tmp, "foo").length());
-
-final File regularFile = new File(tmp, "QuickBrownFoxJumpsOverTheLazyDog");
-regularFile.createNewFile();
-assertTrue(regularFile.exists());
-try {
-  FileUtil.unZip(simpleZip, regularFile);
-  assertTrue("An IOException expected.", false);
-} catch (IOException ioe) {
-  // okay
+try (OutputStream os = new FileOutputStream(simpleZip);
+ ZipArchiveOutputStream tos = new ZipArchiveOutputStream(os)) {
+  try {
+ZipArchiveEntry ze = new  ZipArchiveEntry("foo");
+ze.setUnixMode(0555);
+byte[] data = "some-content".getBytes("UTF-8");
+ze.setSize(data.length);
+tos.putArchiveEntry(ze);
+tos.write(data);
+tos.closeArchiveEntry();
+tos.flush();
+tos.finish();
+  } finally {
+tos.close();
+  }
+
+  // successfully unzip it into an existing dir:
+  FileUtil.unZip(simpleZip, tmp);
+  // check result:
+  assertTrue(new File(tmp, "foo").exists());
+  assertEquals(12, new File(tmp, "foo").length());
+  assertTrue("file lacks execute permissions", new File(tmp, 
"foo").canExecute());
+  assertFalse("file has write permissions", new File(tmp, 
"foo").canWrite());
+  assertTrue("file lacks read permissions", new File(tmp, 
"foo").canRead());
+
+  final File regularFile = new File(tmp, 
"QuickBrownFoxJumpsOverTheLazyDog");
+  

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-22 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=745930=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-745930
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 22/Mar/22 16:43
Start Date: 22/Mar/22 16:43
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1055349079


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 54s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  35m 12s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 17s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  20m 43s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   0m 59s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 38s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m  9s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 39s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m  6s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 27s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 59s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 38s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |  23m 38s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  20m 47s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  20m 47s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   1m  0s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/8/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 3 new + 75 
unchanged - 0 fixed = 78 total (was 75)  |
   | +1 :green_heart: |  mvnsite  |   1m 35s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  3s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 38s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 42s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  25m 31s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  17m 43s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 49s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 211m  3s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/8/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux dc3cb049a2b0 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 
11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 7732357fbfae4404d331d08b9b790d4d752e4b86 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-22 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=745847=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-745847
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 22/Mar/22 14:12
Start Date: 22/Mar/22 14:12
Worklog Time Spent: 10m 
  Work Description: steveloughran commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r832236126



##
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:
   ok




-- 
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: 745847)
Time Spent: 5.5h  (was: 5h 20m)

> 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: 5.5h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-11 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739933=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739933
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 11/Mar/22 08:24
Start Date: 11/Mar/22 08:24
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong edited a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1064881697


   Thank you for your review again.@steveloughran
   > nearly there, just fix the checkstyles and add assertion error messages on 
the checks for permisson
   
   


-- 
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: 739933)
Time Spent: 5h 20m  (was: 5h 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: 5h 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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-11 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739930=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739930
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 11/Mar/22 08:22
Start Date: 11/Mar/22 08:22
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1064881697


   > nearly there, just fix the checkstyles and add assertion error messages on 
the checks for permisson
   Thank you for your review again.@steveloughran
   


-- 
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: 739930)
Time Spent: 5h 10m  (was: 5h)

> 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: 5h 10m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-11 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739926=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739926
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 11/Mar/22 08:21
Start Date: 11/Mar/22 08:21
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r824483898



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -726,7 +727,10 @@ public void testUnZip() throws IOException {
 // check result:
 assertTrue(new File(tmp, "foo").exists());
 assertEquals(12, new File(tmp, "foo").length());
-
+assertTrue(new File(tmp, "foo").canExecute());

Review comment:
   That would be a clearer explanation.I will add it.
   




-- 
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: 739926)
Time Spent: 5h  (was: 4h 50m)

> 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: 5h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-11 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739925=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739925
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 11/Mar/22 08:17
Start Date: 11/Mar/22 08:17
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r824481666



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -706,15 +706,16 @@ public void testCreateLocalTempFile() throws IOException {
   public void testUnZip() throws IOException {
 // make sa simple zip
 final File simpleZip = new File(del, FILE);
-OutputStream os = new FileOutputStream(simpleZip); 
-ZipOutputStream tos = new ZipOutputStream(os);
+OutputStream os = new FileOutputStream(simpleZip);
+ZipArchiveOutputStream tos = new ZipArchiveOutputStream(os);

Review comment:
   good, thouth this is test code, it is also necessary to add this logic.




-- 
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: 739925)
Time Spent: 4h 50m  (was: 4h 40m)

> 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: 4h 50m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-10 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739912=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739912
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 11/Mar/22 07:41
Start Date: 11/Mar/22 07:41
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1064854035


   > can you add ext to the asserts for permissons, e.g
   Good advice. I'll add it
   
   


-- 
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: 739912)
Time Spent: 4h 40m  (was: 4.5h)

> 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: 4h 40m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-10 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739911=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739911
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 11/Mar/22 07:40
Start Date: 11/Mar/22 07:40
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1064854035


   > can you add ext to the asserts for permissons, e.g
   Good advice. I'll add it
   
   


-- 
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: 739911)
Time Spent: 4.5h  (was: 4h 20m)

> 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: 4.5h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739154=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739154
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 09/Mar/22 22:11
Start Date: 09/Mar/22 22:11
Worklog Time Spent: 10m 
  Work Description: steveloughran commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r823134783



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -726,7 +727,10 @@ public void testUnZip() throws IOException {
 // check result:
 assertTrue(new File(tmp, "foo").exists());
 assertEquals(12, new File(tmp, "foo").length());
-
+assertTrue(new File(tmp, "foo").canExecute());

Review comment:
   can you add ext to the asserts for permissons, e.g
   
   ```java
   assertTrue("file lacks execute permissions", new File(tmp, 
"foo").canExecute());
   ```
   
   imagine a yetus test run failed? what do you want in the test reports. a 
line number or a message? 

##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -706,15 +706,16 @@ public void testCreateLocalTempFile() throws IOException {
   public void testUnZip() throws IOException {
 // make sa simple zip
 final File simpleZip = new File(del, FILE);
-OutputStream os = new FileOutputStream(simpleZip); 
-ZipOutputStream tos = new ZipOutputStream(os);
+OutputStream os = new FileOutputStream(simpleZip);
+ZipArchiveOutputStream tos = new ZipArchiveOutputStream(os);

Review comment:
   if you move this to try with resources, the close will be automatic, but 
I'm not worried about this, as its test code and it keeps the patch smaller




-- 
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: 739154)
Time Spent: 4h 20m  (was: 4h 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: 4h 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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739153=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739153
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 09/Mar/22 22:07
Start Date: 09/Mar/22 22:07
Worklog Time Spent: 10m 
  Work Description: steveloughran commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1063421298


   down to the last through checkstyles -this is good.
   ```
   
./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java:694:
  /** Assign the original permissions to the file */: First sentence should end 
with a period. [JavadocStyle]
   
./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java:751:
Files.setPosixFilePermissions(file.toPath(), 
permissionsFromMode(entry.getUnixMode()));: 'if' child has incorrect 
indentation level 16, expected level should be 14. [Indentation]
   
./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java:751:
Files.setPosixFilePermissions(file.toPath(), 
permissionsFromMode(entry.getUnixMode()));: Line is longer than 100 characters 
(found 103). [LineLength]
   ```


-- 
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: 739153)
Time Spent: 4h 10m  (was: 4h)

> 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: 4h 10m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739152=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739152
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 09/Mar/22 22:06
Start Date: 09/Mar/22 22:06
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1055143091






-- 
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: 739152)
Time Spent: 4h  (was: 3h 50m)

> 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: 4h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739151=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739151
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 09/Mar/22 22:06
Start Date: 09/Mar/22 22:06
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1055062921


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 59s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  32m  0s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  22m 29s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  19m 38s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  8s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 41s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 14s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 43s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 28s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  22m 13s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  22m 36s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | -1 :x: |  mvninstall  |   0m 38s | 
[/patch-mvninstall-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-mvninstall-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common in the patch failed.  |
   | -1 :x: |  compile  |   1m  6s | 
[/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root in the patch failed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.  |
   | -1 :x: |  javac  |   1m  6s | 
[/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root in the patch failed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.  |
   | -1 :x: |  compile  |   0m 58s | 
[/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root in the patch failed with JDK Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.  |
   | -1 :x: |  javac  |   0m 58s | 
[/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root in the patch failed with JDK Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 44s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 3 new + 75 
unchanged - 0 fixed = 78 total (was 75)  |
   | -1 :x: |  mvnsite  |   0m 40s | 
[/patch-mvnsite-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-mvnsite-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common in the patch failed.  |
   | +1 :green_heart: |  javadoc  |   0m 47s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 23s |  |  the patch passed with JDK 
Private 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739150=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739150
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 09/Mar/22 22:05
Start Date: 09/Mar/22 22:05
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1054116962


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 54s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  36m 25s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  28m  8s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  23m 46s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  9s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 50s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 16s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 48s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 57s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  26m 14s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  26m 37s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m 10s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  27m 26s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |  27m 26s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 33s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  23m 33s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   1m  5s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/3/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 75 
unchanged - 0 fixed = 77 total (was 75)  |
   | +1 :green_heart: |  mvnsite  |   1m 47s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m 13s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 47s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   3m  4s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  26m 24s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  25m 39s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 53s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 237m 33s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/3/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux 4d8281ddfbcc 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 
11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 23a09963e02a37ea540e2b313f8d04aa28043031 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739149=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739149
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 09/Mar/22 22:04
Start Date: 09/Mar/22 22:04
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1053673689






-- 
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: 739149)
Time Spent: 3.5h  (was: 3h 20m)

> 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: 3.5h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=739147=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-739147
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 09/Mar/22 22:04
Start Date: 09/Mar/22 22:04
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus removed a comment on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1053549729


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   1m  3s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  35m 28s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 45s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  20m 47s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  0s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 38s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m  7s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 40s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m 14s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 35s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m  2s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 38s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | -1 :x: |  javac  |  23m 38s | 
[/results-compile-javac-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/1/artifact/out/results-compile-javac-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 generated 4 new + 1815 unchanged - 1 
fixed = 1819 total (was 1816)  |
   | +1 :green_heart: |  compile  |  20m 45s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | -1 :x: |  javac  |  20m 45s | 
[/results-compile-javac-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/1/artifact/out/results-compile-javac-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 generated 1 new + 1690 
unchanged - 1 fixed = 1691 total (was 1691)  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 59s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/1/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 75 
unchanged - 0 fixed = 77 total (was 75)  |
   | +1 :green_heart: |  mvnsite  |   1m 35s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  6s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 41s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | -1 :x: |  spotbugs  |   2m 43s | 
[/new-spotbugs-hadoop-common-project_hadoop-common.html](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/1/artifact/out/new-spotbugs-hadoop-common-project_hadoop-common.html)
 |  hadoop-common-project/hadoop-common generated 2 new + 0 unchanged - 0 fixed 
= 2 total (was 0)  |
   | +1 :green_heart: |  shadedclient  |  25m 33s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | -1 :x: |  unit  |  24m 58s | 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-01 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734533=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734533
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 11:53
Start Date: 01/Mar/22 11:53
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1055349079


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 54s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  35m 12s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 17s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  20m 43s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   0m 59s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 38s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m  9s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 39s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m  6s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 27s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 59s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 38s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |  23m 38s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  20m 47s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  20m 47s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   1m  0s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/8/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 3 new + 75 
unchanged - 0 fixed = 78 total (was 75)  |
   | +1 :green_heart: |  mvnsite  |   1m 35s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  3s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 38s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 42s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  25m 31s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  17m 43s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 49s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 211m  3s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/8/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux dc3cb049a2b0 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 
11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 7732357fbfae4404d331d08b9b790d4d752e4b86 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  Test 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-03-01 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734411=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734411
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 08:16
Start Date: 01/Mar/22 08:16
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1055143091


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 57s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  32m 12s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  22m 19s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  19m 38s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  9s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 43s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 14s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 42s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  21m 59s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  22m 23s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | -1 :x: |  mvninstall  |   0m 36s | 
[/patch-mvninstall-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/7/artifact/out/patch-mvninstall-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common in the patch failed.  |
   | -1 :x: |  compile  |   1m  5s | 
[/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/7/artifact/out/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root in the patch failed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.  |
   | -1 :x: |  javac  |   1m  5s | 
[/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/7/artifact/out/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root in the patch failed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.  |
   | -1 :x: |  compile  |   0m 58s | 
[/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/7/artifact/out/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root in the patch failed with JDK Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.  |
   | -1 :x: |  javac  |   0m 58s | 
[/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/7/artifact/out/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root in the patch failed with JDK Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 43s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/7/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 3 new + 75 
unchanged - 0 fixed = 78 total (was 75)  |
   | -1 :x: |  mvnsite  |   0m 42s | 
[/patch-mvnsite-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/7/artifact/out/patch-mvnsite-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common in the patch failed.  |
   | +1 :green_heart: |  javadoc  |   0m 48s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 23s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734383=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734383
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 07:37
Start Date: 01/Mar/22 07:37
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r816435439



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -726,7 +727,10 @@ public void testUnZip() throws IOException {
 // check result:
 assertTrue(new File(tmp, "foo").exists());
 assertEquals(12, new File(tmp, "foo").length());
-
+assertTrue(new File(tmp, "foo").canExecute());
+assertTrue(new File(tmp, "foo").canRead());
+assertTrue(new File(tmp, "foo").canWrite());

Review comment:
   1.This is a good test scenario, but windows system does not have the 
permission information of group/other  IIRC.
   2.If it is a Windows operating platform, it will skip the permission logic, 
because the Windows system itself does not have detailed executable permission, 
only read and write permission,the method of canExecute defaults to true on 
Windows systems.




-- 
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: 734383)
Time Spent: 2h 50m  (was: 2h 40m)

> 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: 2h 50m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734378=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734378
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 07:20
Start Date: 01/Mar/22 07:20
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 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: 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: 734378)
Time Spent: 2h 40m  (was: 2.5h)

> 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: 2h 40m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734359=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734359
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 06:22
Start Date: 01/Mar/22 06:22
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1055067874


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 52s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  35m  8s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 19s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  20m 52s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  0s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 38s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 12s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 39s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m 10s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 30s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | -1 :x: |  mvninstall  |   0m 39s | 
[/patch-mvninstall-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/5/artifact/out/patch-mvninstall-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common in the patch failed.  |
   | -1 :x: |  compile  |   1m  7s | 
[/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/5/artifact/out/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root in the patch failed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.  |
   | -1 :x: |  javac  |   1m  7s | 
[/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/5/artifact/out/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root in the patch failed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.  |
   | -1 :x: |  compile  |   0m 58s | 
[/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/5/artifact/out/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root in the patch failed with JDK Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.  |
   | -1 :x: |  javac  |   0m 58s | 
[/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/5/artifact/out/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root in the patch failed with JDK Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 43s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/5/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 3 new + 75 
unchanged - 0 fixed = 78 total (was 75)  |
   | -1 :x: |  mvnsite  |   0m 41s | 
[/patch-mvnsite-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/5/artifact/out/patch-mvnsite-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common in the patch failed.  |
   | +1 :green_heart: |  javadoc  |   0m 49s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 23s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734356=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734356
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 06:14
Start Date: 01/Mar/22 06:14
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1055062921


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 59s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  32m  0s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  22m 29s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  19m 38s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  8s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 41s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 14s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 43s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 28s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  22m 13s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  22m 36s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | -1 :x: |  mvninstall  |   0m 38s | 
[/patch-mvninstall-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-mvninstall-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common in the patch failed.  |
   | -1 :x: |  compile  |   1m  6s | 
[/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root in the patch failed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.  |
   | -1 :x: |  javac  |   1m  6s | 
[/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-compile-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root in the patch failed with JDK Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.  |
   | -1 :x: |  compile  |   0m 58s | 
[/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root in the patch failed with JDK Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.  |
   | -1 :x: |  javac  |   0m 58s | 
[/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-compile-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root in the patch failed with JDK Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 44s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 3 new + 75 
unchanged - 0 fixed = 78 total (was 75)  |
   | -1 :x: |  mvnsite  |   0m 40s | 
[/patch-mvnsite-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/6/artifact/out/patch-mvnsite-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common in the patch failed.  |
   | +1 :green_heart: |  javadoc  |   0m 47s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 23s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734340=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734340
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 04:19
Start Date: 01/Mar/22 04:19
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r816437491



##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -715,6 +746,9 @@ public static void unZip(File inFile, File unzipDir) throws 
IOException {
   }
 } finally {
   out.close();
+  if (entry.getPlatform() == ZipArchiveEntry.PLATFORM_UNIX) {

Review comment:
   This is a good suggestion and I will revise it.




-- 
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: 734340)
Time Spent: 2h 10m  (was: 2h)

> 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: 2h 10m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734339=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734339
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 04:18
Start Date: 01/Mar/22 04:18
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1054997123


   > seems a reasonable idea, just some details about production code and tests 
to resolve
   
   Thank you for your review.@steveloughran


-- 
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: 734339)
Time Spent: 2h  (was: 1h 50m)

> 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: 2h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734338=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734338
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 04:17
Start Date: 01/Mar/22 04:17
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r816430648



##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -36,8 +36,11 @@
 import java.nio.charset.CharsetEncoder;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.AccessDeniedException;
+import java.nio.file.attribute.PosixFilePermission;
 import java.nio.file.FileSystems;
 import java.nio.file.Files;
+
+import java.util.*;

Review comment:
It is true that there was a problem when IDE was introduced.




-- 
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: 734338)
Time Spent: 1h 50m  (was: 1h 40m)

> 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 50m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734337=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734337
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 04:12
Start Date: 01/Mar/22 04:12
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r816435439



##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -726,7 +727,10 @@ public void testUnZip() throws IOException {
 // check result:
 assertTrue(new File(tmp, "foo").exists());
 assertEquals(12, new File(tmp, "foo").length());
-
+assertTrue(new File(tmp, "foo").canExecute());
+assertTrue(new File(tmp, "foo").canRead());
+assertTrue(new File(tmp, "foo").canWrite());

Review comment:
   1.This is a good test scenario and I will add it.
   2.If it is a Windows operating platform, it will skip the permission logic, 
because the Windows system itself does not have detailed executable permission, 
only read and write permission,the method of canExecute defaults to true on 
Windows systems.




-- 
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: 734337)
Time Spent: 1h 40m  (was: 1.5h)

> 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 40m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734333=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734333
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 04:00
Start Date: 01/Mar/22 04:00
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r816431752



##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -676,6 +682,31 @@ public static void unZip(InputStream inputStream, File 
toDir)
 }
   }
 
+  public static Set permissionsFromMode(Integer mode) {

Review comment:
   I'm going to change it to int.




-- 
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: 734333)
Time Spent: 1.5h  (was: 1h 20m)

> 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: 1.5h
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734332=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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=734330=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-734330
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 01/Mar/22 03:56
Start Date: 01/Mar/22 03:56
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r816430648



##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -36,8 +36,11 @@
 import java.nio.charset.CharsetEncoder;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.AccessDeniedException;
+import java.nio.file.attribute.PosixFilePermission;
 import java.nio.file.FileSystems;
 import java.nio.file.Files;
+
+import java.util.*;

Review comment:
   Thank you for your review. It is true that there was a problem when IDE 
was introduced.




-- 
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: 734330)
Time Spent: 1h 10m  (was: 1h)

> 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 10m
>  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



[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=733899=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-733899
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Feb/22 14:42
Start Date: 28/Feb/22 14:42
Worklog Time Spent: 10m 
  Work Description: steveloughran commented on a change in pull request 
#4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r815939653



##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -36,8 +36,11 @@
 import java.nio.charset.CharsetEncoder;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.AccessDeniedException;
+import java.nio.file.attribute.PosixFilePermission;
 import java.nio.file.FileSystems;
 import java.nio.file.Files;
+
+import java.util.*;

Review comment:
   no .* expansions, just add any new imports into the existing ones. and 
tell your IDE to stop combining imports into .* for future hadoop prs. please: 
imports are backport pain

##
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:
   what if this fails? 

##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -726,7 +727,10 @@ public void testUnZip() throws IOException {
 // check result:
 assertTrue(new File(tmp, "foo").exists());
 assertEquals(12, new File(tmp, "foo").length());
-
+assertTrue(new File(tmp, "foo").canExecute());

Review comment:
   asserttrue tests need to say what is wrong when the assert fails. the 
goal is to make a failed yetus/test run meaningful.

##
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##
@@ -726,7 +727,10 @@ public void testUnZip() throws IOException {
 // check result:
 assertTrue(new File(tmp, "foo").exists());
 assertEquals(12, new File(tmp, "foo").length());
-
+assertTrue(new File(tmp, "foo").canExecute());
+assertTrue(new File(tmp, "foo").canRead());
+assertTrue(new File(tmp, "foo").canWrite());

Review comment:
   1. there's no tests to verify that other/group permissions are picked 
up. not sure if it is possible.
   2. what happens if someone runs the test on windows?

##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -676,6 +682,31 @@ public static void unZip(InputStream inputStream, File 
toDir)
 }
   }
 
+  public static Set permissionsFromMode(Integer mode) {

Review comment:
   is mode ever null?

##
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java
##
@@ -715,6 +746,9 @@ public static void unZip(File inFile, File unzipDir) throws 
IOException {
   }
 } finally {
   out.close();
+  if (entry.getPlatform() == ZipArchiveEntry.PLATFORM_UNIX) {

Review comment:
   this is going to execute even if writing to out failed. not sure that is 
ideal.
   better to put it on a line after the try/finally block. so is only called if 
the write succeeded.




-- 
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: 733899)
Time Spent: 1h  (was: 50m)

> 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
>  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 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=733792=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-733792
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Feb/22 10:36
Start Date: 28/Feb/22 10:36
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1054116962


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 54s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  36m 25s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  28m  8s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  23m 46s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  9s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 50s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 16s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 48s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 57s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  26m 14s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  26m 37s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m 10s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  27m 26s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |  27m 26s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 33s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  23m 33s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   1m  5s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/3/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 75 
unchanged - 0 fixed = 77 total (was 75)  |
   | +1 :green_heart: |  mvnsite  |   1m 47s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m 13s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 47s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   3m  4s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  26m 24s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  25m 39s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 53s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 237m 33s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/3/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux 4d8281ddfbcc 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 
11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 23a09963e02a37ea540e2b313f8d04aa28043031 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  Test 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=733788=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-733788
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 28/Feb/22 10:16
Start Date: 28/Feb/22 10:16
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1054099322


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 58s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  35m  5s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 17s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  20m 40s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  1s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 36s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m  7s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 35s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 32s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m  7s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 29s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m  5s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  24m  0s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |  24m  0s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  20m 38s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  20m 38s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  1s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   1m  0s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/4/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 75 
unchanged - 0 fixed = 77 total (was 75)  |
   | +1 :green_heart: |  mvnsite  |   1m 35s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  4s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 39s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 43s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  25m 27s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | +1 :green_heart: |  unit  |  24m 56s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 49s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 218m 17s |  |  |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/4/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux c30ae7ea90e2 4.15.0-166-generic #174-Ubuntu SMP Wed Dec 8 
19:07:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 23a09963e02a37ea540e2b313f8d04aa28043031 |
   | Default Java | Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 |
   |  Test 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=733650=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-733650
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 27/Feb/22 20:39
Start Date: 27/Feb/22 20:39
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1053673689


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   0m 55s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  37m 32s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m  9s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  20m 40s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  0s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 36s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m  7s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 41s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m 27s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 47s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m  0s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 36s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javac  |  23m 36s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  20m 39s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  javac  |  20m 39s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 59s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/2/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 75 
unchanged - 0 fixed = 77 total (was 75)  |
   | +1 :green_heart: |  mvnsite  |   1m 34s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  3s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 39s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 41s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  25m 31s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | -1 :x: |  unit  |  28m 18s | 
[/patch-unit-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/2/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 50s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 223m 51s |  |  |
   
   
   | Reason | Tests |
   |---:|:--|
   | Failed junit tests | hadoop.fs.TestFileUtil |
   
   
   | Subsystem | Report/Notes |
   |--:|:-|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/2/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/4036 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell |
   | uname | Linux 3aef19088411 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 
06:54:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 5c3e32fbb791db733a6547c019e08d47db164d09 |
   | 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=733631=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-733631
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 27/Feb/22 13:02
Start Date: 27/Feb/22 13:02
Worklog Time Spent: 10m 
  Work Description: hadoop-yetus commented on pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#issuecomment-1053549729


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |::|--:|:|::|:---:|
   | +0 :ok: |  reexec  |   1m  3s |  |  Docker mode activated.  |
    _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
    _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  35m 28s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  24m 45s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  compile  |  20m 47s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  checkstyle  |   1m  0s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 38s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m  7s |  |  trunk passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 40s |  |  trunk passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | +1 :green_heart: |  spotbugs  |   2m 30s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  25m 14s |  |  branch has no errors 
when building and testing our client artifacts.  |
   | -0 :warning: |  patch  |  25m 35s |  |  Used diff version of patch file. 
Binary files and potentially other changes not applied. Please rebase and 
squash commits if necessary.  |
    _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   1m  2s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  23m 38s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | -1 :x: |  javac  |  23m 38s | 
[/results-compile-javac-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/1/artifact/out/results-compile-javac-root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04.txt)
 |  root-jdkUbuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04 generated 4 new + 1815 unchanged - 1 
fixed = 1819 total (was 1816)  |
   | +1 :green_heart: |  compile  |  20m 45s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | -1 :x: |  javac  |  20m 45s | 
[/results-compile-javac-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/1/artifact/out/results-compile-javac-root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07.txt)
 |  root-jdkPrivateBuild-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07 generated 1 new + 1690 
unchanged - 1 fixed = 1691 total (was 1691)  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   0m 59s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/1/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 2 new + 75 
unchanged - 0 fixed = 77 total (was 75)  |
   | +1 :green_heart: |  mvnsite  |   1m 35s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  6s |  |  the patch passed with JDK 
Ubuntu-11.0.13+8-Ubuntu-0ubuntu1.20.04  |
   | +1 :green_heart: |  javadoc  |   1m 41s |  |  the patch passed with JDK 
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07  |
   | -1 :x: |  spotbugs  |   2m 43s | 
[/new-spotbugs-hadoop-common-project_hadoop-common.html](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4036/1/artifact/out/new-spotbugs-hadoop-common-project_hadoop-common.html)
 |  hadoop-common-project/hadoop-common generated 2 new + 0 unchanged - 0 fixed 
= 2 total (was 0)  |
   | +1 :green_heart: |  shadedclient  |  25m 33s |  |  patch has no errors 
when building and testing our client artifacts.  |
    _ Other Tests _ |
   | -1 :x: |  unit  |  24m 58s | 

[jira] [Work logged] (HADOOP-18145) Fileutil's unzip method causes unzipped files to lose their original permissions

2022-02-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-18145?focusedWorklogId=733613=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-733613
 ]

ASF GitHub Bot logged work on HADOOP-18145:
---

Author: ASF GitHub Bot
Created on: 27/Feb/22 09:18
Start Date: 27/Feb/22 09:18
Worklog Time Spent: 10m 
  Work Description: zhongjingxiong opened a new pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036


   …missions
   
   
   
   ### Description of PR
   When we use the unzip method of Hadoop common to decompress, the UNIX 
permission cannot be reserved, so we use the ziparchiveentry of Apache common 
to preserve the permission information. When the file has UNIX permission, the 
unzip decompression method will preserve the permission first, and then set the 
original permission information to the new file.
   
   ### How was this patch tested?
   Unit tests were conducted.
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   


-- 
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: 733613)
Remaining Estimate: 0h
Time Spent: 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
>  Time Spent: 10m
>  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