diff --git a/pkg/util/os.go b/pkg/util/os.go new file mode 100644 index 000000000..03b97766d --- /dev/null +++ b/pkg/util/os.go @@ -0,0 +1,10 @@ +package util + +import "os" + +// MkdirAllX calls os.MkdirAll with passed permissions +// but with +x for user and group. This makes created +// dir openable regardless of the passed permissions. +func MkdirAllX(path string, perm os.FileMode) error { + return os.MkdirAll(path, perm|0110) +}