From cacb292921553900ea808344599b9914632bf1d3 Mon Sep 17 00:00:00 2001 From: Gregory Haskins Date: Tue, 4 Apr 2017 09:21:17 -0400 Subject: [PATCH] [FAB-2865] Set the chaincode file mode bits We should force the mode bits, rather than accepting what the filesystem just happened to present. Fixes FAB-2865 Change-Id: I02618026927607cc78fd5545e05880bf01bea5af Signed-off-by: Gregory Haskins --- core/container/util/writer.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/container/util/writer.go b/core/container/util/writer.go index 3b6ddbd1ce8..206cc4616ec 100644 --- a/core/container/util/writer.go +++ b/core/container/util/writer.go @@ -149,6 +149,7 @@ func WriteStreamToPackage(is io.Reader, localpath string, packagepath string, tw header.ModTime = zeroTime header.ChangeTime = zeroTime header.Name = packagepath + header.Mode = 0100644 if err = tw.WriteHeader(header); err != nil { return fmt.Errorf("Error write header for (path: %s, oldname:%s,newname:%s,sz:%d) : %s", localpath, oldname, packagepath, header.Size, err)