Skip to content

Commit 88c1947

Browse files
authored
Respect default umask in distribution archive (#2023)
When copying files from the nix store to the intermediate directory, ignore the source file permissions. These are coming from the nix store, so they will not be writable. Without this change, this will result in unexpected `Permission denied` when manipulating extracted files. Fixes: #2022
1 parent 57f9329 commit 88c1947

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@
406406
# Copy exes to intermediate dir
407407
cp \
408408
--no-clobber \
409+
--no-preserve=mode \
409410
--remove-destination \
410411
--verbose \
411412
${lib.concatMapStringsSep " " (exe: "${exe}/bin/*") exes} \
@@ -414,6 +415,7 @@
414415
# Copy magrations to intermediate dir
415416
cp \
416417
--no-clobber \
418+
--no-preserve=mode \
417419
--remove-destination \
418420
--verbose \
419421
--recursive \

0 commit comments

Comments
 (0)