diff --git a/src/libstore/build.cc b/src/libstore/build.cc index d04513ddb..3fd1a7b38 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2578,6 +2578,7 @@ void DerivationGoal::writeStructuredAttrs() } writeFile(tmpDir + "/.attrs.json", rewriteStrings(json.dump(), inputRewrites)); + chownToBuilder(tmpDir + "/.attrs.json"); /* As a convenience to bash scripts, write a shell file that maps all attributes that are representable in bash - @@ -2646,6 +2647,7 @@ void DerivationGoal::writeStructuredAttrs() } writeFile(tmpDir + "/.attrs.sh", rewriteStrings(jsonSh, inputRewrites)); + chownToBuilder(tmpDir + "/.attrs.sh"); }