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