Unix access rights are not properly set when running dotnet zip on Windows #8

Open
opened 2026-01-29 16:27:06 +00:00 by claunia · 1 comment
Owner

Originally created by @kekekeks on GitHub (Oct 2, 2017).

Even if you publish with linux/osx runtime, access rights won't be set, since Win32 doesn't support them.
SharpZipLib doesn't support setting them manually, so consider using System.IO.Compression.ZipArchive and setting them using ZipArchiveEntry::ExternalAttributes

Originally created by @kekekeks on GitHub (Oct 2, 2017). Even if you publish with linux/osx runtime, access rights won't be set, since Win32 doesn't support them. SharpZipLib doesn't support setting them manually, so consider using `System.IO.Compression.ZipArchive` and setting them using [ZipArchiveEntry::ExternalAttributes](https://github.com/dotnet/corefx/blob/master/src/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs#L171)
Author
Owner

@qmfrederik commented on GitHub (Oct 2, 2017):

Thanks for reporting this!

Yes, this something that's worth fixing. I'm not sure using System.IO.Compression.ZipArchive is the right approach, though. There are a lot of issues with that library and it bit me more than once. Perhaps SharpCompression is a better option; not sure whethery they support setting external attributes.

@qmfrederik commented on GitHub (Oct 2, 2017): Thanks for reporting this! Yes, this something that's worth fixing. I'm not sure using `System.IO.Compression.ZipArchive` is the right approach, though. There are a lot of issues with that library and it bit me more than once. Perhaps [SharpCompression](https://github.com/adamhathcock/sharpcompress) is a better option; not sure whethery they support setting external attributes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dotnet-packaging#8