guava: Files#createTempDir stopped working on Windows with 32.0.0

After update to guava 32.0.0 on Windows we start having such exception

 Caused by: java.lang.UnsupportedOperationException: 'posix:permissions' not supported as initial attribute
            at sun.nio.fs.WindowsSecurityDescriptor.fromAttribute(WindowsSecurityDescriptor.java:358)
            at sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:492)
            at java.nio.file.Files.createDirectory(Files.java:674)
            at java.nio.file.TempFileHelper.create(TempFileHelper.java:136)
            at java.nio.file.TempFileHelper.createTempDirectory(TempFileHelper.java:173)
            at java.nio.file.Files.createTempDirectory(Files.java:950)
            at com.google.common.io.TempFileCreator$JavaNioCreator.createTempDir(TempFileCreator.java:102)
            at com.google.common.io.Files.createTempDir(Files.java:439)

seems it is related to https://github.com/google/guava/commit/feb83a1c8fd2e7670b244d5afd23cba5aca43284

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I’d be interested to hear […] from other users who are affected

See JENKINS-71375. There are about 21,984 installations (across all operating systems) of the Jenkins Artifactory plugin, which is subject to https://github.com/jfrog/build-info/issues/737 on Windows. As a result, Jenkins Artifactory plugin users who are running Jenkins on Windows are impacted by this issue.

Thanks, that does sound likely to be the same problem as https://github.com/google/guava/issues/6634. I have a fix out for review.

After some more searching around, I’ve come across codeql.github.com/codeql-query-help/java/java-local-temp-file-or-directory-information-disclosure, which at least suggests that Windows is different than Unix.

I wrote this documentation, and wrote the query, and I’m just going based upon what I heard from someone else. I’ve never actually confirmed this myself. I don’t ever develop code on/for windows