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

(zipfs) Files.setPosixFilePermission does not work with CIFS share

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 8, 11, 13, 15, 17
    • core-libs
    • None
    • mount.cifs share

      The fix to JDK-8229888 doesn't work on e.g. CIFS share, a directory mounted on a Linux with mount.cifs from a Windows server (which is a reverse configuration to the reported in discussion for that bug). There are plenty of these everywhere: Azure shares, corporate NASes exported in CIFS etc. A non-root account could do almost anything there but an attempt to set Unix permissions would fail with non-zero exit status.

      Now, exactly this happens in ZipFileSystem::sync() :
              if (attrs != null) {
                  Files.setPosixFilePermissions(tmpFile, attrs.permissions());
              }
      Attribute view of this CIFS share is supported but not fully. As a result, there is a java.nio.file.FileSystemException and updating of a zip file totally fails.

      It's a regression. Fix is, I think, to catch and ignore java.nio.file.FileSystemException.

            bpb Brian Burkhalter
            yan Yuri Nesterenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: