diff --git a/libnetwork/osl/namespace_linux.go b/libnetwork/osl/namespace_linux.go index 9b2c82eda6..1b7b230380 100644 --- a/libnetwork/osl/namespace_linux.go +++ b/libnetwork/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/libnetwork/sandbox.go b/libnetwork/sandbox.go index bd473947aa..e0a3b2e5b0 100644 --- a/libnetwork/sandbox.go +++ b/libnetwork/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 {