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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8, 11, 13, 15, 17
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:
      None
    • Environment:

      mount.cifs share

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated: