Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8322881

java/nio/file/Files/CopyMoveVariations.java fails with AccessDeniedException due to permissions of files in /tmp

XMLWordPrintable

    • b12
    • linux

        testcase: java/nio/file/Files/CopyMoveVariations.java

        Method createTempFile() creates "/tmp/file*" directory that it causes file copy permission issue when running through jtreg.

        details:

        ```
        SUCCESSFUL CopyMoveVariations::copyFollow '[45] LINK, rw-rw-rw-, false, false'
        STARTED CopyMoveVariations::copyFollow '[46] LINK, rw-rw-rw-, false, true'
        SUCCESSFUL CopyMoveVariations::copyFollow '[46] LINK, rw-rw-rw-, false, true'
        STARTED CopyMoveVariations::copyFollow '[47] LINK, rw-rw-rw-, true, false'
        SUCCESSFUL CopyMoveVariations::copyFollow '[47] LINK, rw-rw-rw-, true, false'
        STARTED CopyMoveVariations::copyFollow '[48] LINK, rw-rw-rw-, true, true'
        SUCCESSFUL CopyMoveVariations::copyFollow '[48] LINK, rw-rw-rw-, true, true'
        STARTED CopyMoveVariations::move '[1] FILE, ---------, false, false'
        java.nio.file.AccessDeniedException: /tmp/file5458509807535698986dat
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixFileSystem.copyFile(UnixFileSystem.java:658)
        at java.base/sun.nio.fs.UnixFileSystem.move(UnixFileSystem.java:963)
        at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:309)
        at java.base/java.nio.file.Files.move(Files.java:1431)
        at CopyMoveVariations.op(CopyMoveVariations.java:195)
        at CopyMoveVariations.move(CopyMoveVariations.java:136)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
        at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
        ```

              syaqi Sun Yaqi
              syaqi Sun Yaqi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: