There was an error while loading. Please reload this page.
1 parent d6c17e0 commit 8989c69Copy full SHA for 8989c69
pkg/util/tar_utils.go
@@ -22,11 +22,16 @@ import (
22
"os"
23
"path/filepath"
24
"strings"
25
+"syscall"
26
27
"github.com/sirupsen/logrus"
28
)
29
30
func unpackTar(tr *tar.Reader, path string) error {
31
+// drop the umask temporarily to 0, so we can create all files with correct permissions
32
+// otherwise the default (022) will cause file permission inconsistencies
33
+oldMask := syscall.Umask(0)
34
+defer syscall.Umask(oldMask)
35
for {
36
header, err := tr.Next()
37
if err == io.EOF {
0 commit comments