diff --git a/cmd/buildah/common.go b/cmd/buildah/common.go index 49794a10e53..94af1e2285e 100644 --- a/cmd/buildah/common.go +++ b/cmd/buildah/common.go @@ -3,6 +3,7 @@ package main import ( "context" "os" + "syscall" "time" "github.com/containers/buildah" @@ -13,6 +14,7 @@ import ( "github.com/containers/storage" "github.com/opencontainers/go-digest" "github.com/pkg/errors" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/pflag" ) @@ -88,6 +90,11 @@ func getStore(c *cobra.Command) (storage.Store, error) { options.GIDMap = gidmap } + oldUmask := syscall.Umask(0) + if oldUmask != 0 { + logrus.Debugf("umask value different than 0. Forcing it to 0") + } + store, err := storage.GetStore(options) if store != nil { is.Transport.SetStore(store)