Skip to content

Compress-Archive is stripping UNIX file permissions #36

Open
@pcgeek86

Description

@pcgeek86

Related ticket: PowerShell/PowerShell#3590

Steps to reproduce

Set-Content -Path mytestfile.txt -Value testing
Compress-Archive -Path mytestfile.txt -Destination mytestzip.zip
zipinfo mytestzip.zip
Result of zipinfo command
Archive:  mytestzip.zip
Zip file size: 136 bytes, number of entries: 1
?---------  2.0 unx        8 b- defN 17-Apr-18 12:23 mytestfile.txt
1 file, 8 bytes uncompressed, 10 bytes compressed:  -25.0%

Expected behavior

Permissions of files are retained upon compression into ZIP format.

Actual behavior

Permissions are not preserved when files are compressed.

Environment data

Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.18
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
PS /> uname -a
Darwin 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar  3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

Cheers,
Trevor Sullivan

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions