Skip to content

extractAllTo() no longer preserves linux file permissions #530

Closed

Description

@ocmstone

In version 0.5.15, the following function call: zip.extractAllTo(unzipFileLocation, true, true)

Is supposed to keepOriginalPermission when the third argument is true. Up to version 0.5.14 this worked correctly, preserving Linux rwx permissions. But as of 0.5.15, it is as if there is a umask of 0o117 when unpacking. It also adds write permission for group.

A file in the zip archive was saved with these permissions:
-rwxr-x--- 1 user staff 9744 Aug 12 2024 opscompass.sh*

But unzipped as:
-rw-rw---- 1 user staff 9744 Aug 12 2024 opscompass.sh*

VERIFIED: 0.5.14 still works correctly

Activity

  1. NickAllmakerOpsCompass commented on Aug 12, 2024

    @NickAllmakerOpsCompass
    Contributor

    I'm not 100% sure but it looks like the issue was introduced by the change to number parsing in #518. Specifically, I think that when fileAttr switched from just doing bitwise arithmetic to the uint16 helper, that caused it to start turning fileAttr into 0.

  2. chadlwilson commented on Aug 19, 2024

    @chadlwilson

    This was fixed by #531 - @cthackers would you be able to cut a 0.5.16 release to fix this regression? 🙏

  3. added a commit that references this issue on Aug 23, 2024
  4. added a commit that references this issue on Nov 12, 2025
  5. cthackers commented on Jul 10, 2026

    @cthackers
    Owner

    Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions