# Permissions not preserved when deflating an imported package with binaries

**URL:** <https://ziggit.dev/t/permissions-not-preserved-when-deflating-an-imported-package-with-binaries/5769>\
**Category:** Help\
**Tags:** build-system\
**Created:** [August 26, 2024, 12:58pm UTC](https://ziggit.dev/t/permissions-not-preserved-when-deflating-an-imported-package-with-binaries/5769 "2024-08-26T12:58:59Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Sze](https://ziggit.dev/user_avatar/ziggit.dev/sze/32/496_2.png) [@Sze](https://ziggit.dev/u/Sze)\
**Post date:** [August 26, 2024, 2:44pm UTC](https://ziggit.dev/t/permissions-not-preserved-when-deflating-an-imported-package-with-binaries/5769/6 "2024-08-26T14:44:21Z")

</div>

If it isn’t umask, I don’t know what the reason is for the files missing permissions, whether it is something that zig does explicitly or whether it is a bug.

Maybe you could do something like here, until you find out the reason?:

> [@In build.zig, how do I mark a LazyPath as executable?](https://ziggit.dev/t/in-build-zig-how-do-i-mark-a-lazypath-as-executable/5704):
>
> I have a build.zig task to create a file on disk, which returns me a LazyPath. How do I additionally make sure that the lazy path is marked executable? The LazyPath in question comes originally from a Step.Run.captureStdOut. I guess I can additionally addSystemCommand(&.{"chmod"}) somewhere, but I’d rather not make this platform specfic.

* * *

Maybe another reason would be that the user that executes `zig fetch` doesn’t have the permissions to create a file with those permissions? So basically I mean, maybe there are other things besides umask that can interfere with the resulting permissions? (My knowledge is limited in this area, but I think something like this could be the case)

---

_[View the full topic](https://ziggit.dev/t/permissions-not-preserved-when-deflating-an-imported-package-with-binaries/5769)._
