[ https://issues.apache.org/jira/browse/HADOOP-19488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17935799#comment-17935799 ]
ASF GitHub Bot commented on HADOOP-19488: ----------------------------------------- sjlee opened a new pull request, #7511: URL: https://github.com/apache/hadoop/pull/7511 Use ACL-based permissions for Windows instead of POSIX permissions. <!-- Thanks for sending a pull request! 1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute 2. Make sure your PR title starts with JIRA issue id, e.g., 'HADOOP-17799. Your PR title ...'. --> ### Description of PR Fix Hadoop RunJar for Windows. The Windows filesystem does not recognize the POSIX permissions, and it was causing the directory creation failure. If the filesystem does not support POSIX permissions, switch to using the user-based, ACL-based permissions that work on Windows. ### How was this patch tested? I added a test to TestRunJar and ran it first to reproduce the bug on Windows. After I changed RunJar.java, I ran TestRunJar on Windows and confirmed it runs successfully. ### For code changes: - [x] 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? > RunJar throws UnsupportedOperationException on Windows > ------------------------------------------------------ > > Key: HADOOP-19488 > URL: https://issues.apache.org/jira/browse/HADOOP-19488 > Project: Hadoop Common > Issue Type: Bug > Components: hadoop-common > Affects Versions: 3.4.1 > Reporter: Sangjin Lee > Priority: Major > > On Windows, run {{hadoop jar}} (with any jar). One immediately gets the > following exception: > {code} > Exception in thread "main" java.lang.UnsupportedOperationException: > 'posix:permissions' not supported as initial attribute > at > java.base/sun.nio.fs.WindowsSecurityDescriptor.fromAttribute(WindowsSecurityDescriptor.java:358) > at > java.base/sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:497) > at java.base/java.nio.file.Files.createDirectory(Files.java:690) > at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:135) > at > java.base/java.nio.file.TempFileHelper.createTempDirectory(TempFileHelper.java:172) > at java.base/java.nio.file.Files.createTempDirectory(Files.java:966) > at org.apache.hadoop.util.RunJar.run(RunJar.java:296) > at org.apache.hadoop.util.RunJar.main(RunJar.java:245) > {code} > I'm running Windows 11 with OpenJDK 11.0.26. > This bug does not exist in 3.3.6. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org