From 9e400ad567a4d8d76bf69cccd9be75d715b2f2d4 Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Thu, 17 Sep 2015 15:19:23 -0400 Subject: [PATCH] Correct perms for directory creation Directories should be 0755, not 0644 Docker-DCO-1.1-Signed-off-by: Phil Estes (github: estesp) --- osl/namespace_linux.go | 2 +- sandbox.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/osl/namespace_linux.go b/osl/namespace_linux.go index 9b2c82e..1b7b230 100644 --- a/osl/namespace_linux.go +++ b/osl/namespace_linux.go @@ -49,7 +49,7 @@ func init() { } func createBasePath() { - err := os.MkdirAll(prefix, 0644) + err := os.MkdirAll(prefix, 0755) if err != nil { panic("Could not create net namespace path directory") } diff --git a/sandbox.go b/sandbox.go index bd47394..e0a3b2e 100644 --- a/sandbox.go +++ b/sandbox.go @@ -416,6 +416,7 @@ func (sb *sandbox) clearNetworkResources(ep *endpoint) error { const ( defaultPrefix = "/var/lib/docker/network/files" + dirPerm = 0755 filePerm = 0644 ) @@ -777,7 +778,7 @@ func (eh *epHeap) Pop() interface{} { } func createBasePath(dir string) error { - return os.MkdirAll(dir, filePerm) + return os.MkdirAll(dir, dirPerm) } func createFile(path string) error {