From 3f96d3617bd41a0fe653892c3c3675777b7aadf3 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 18 Mar 2019 22:51:22 +0100 Subject: rootless: fix ps command Signed-off-by: Giuseppe Scrivano --- cmd/podman/ps.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/podman/ps.go') diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go index de6966c3b..ad942da2e 100644 --- a/cmd/podman/ps.go +++ b/cmd/podman/ps.go @@ -17,6 +17,7 @@ import ( "github.com/containers/libpod/cmd/podman/libpodruntime" "github.com/containers/libpod/cmd/podman/shared" "github.com/containers/libpod/libpod" + "github.com/containers/libpod/pkg/rootless" "github.com/containers/libpod/pkg/util" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/docker/go-units" @@ -200,6 +201,9 @@ func init() { } func psCmd(c *cliconfig.PsValues) error { + if os.Geteuid() != 0 { + rootless.SetSkipStorageSetup(true) + } if c.Bool("trace") { span, _ := opentracing.StartSpanFromContext(Ctx, "psCmd") defer span.Finish() -- cgit v1.2.3-54-g00ecf