diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index de302e5ca025ff00abc15e4ccf2d08c9ef28bdfa..bc890002a40be3038ee9c5dfa32c8a2c108efab8 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -1290,6 +1290,10 @@ func setupDaemonRootPropagation(cfg *config.Config) error { return nil } + if err := os.MkdirAll(filepath.Dir(cleanupFile), 0700); err != nil { + return errors.Wrap(err, "error creating dir to store mount cleanup file") + } + if err := ioutil.WriteFile(cleanupFile, nil, 0600); err != nil { return errors.Wrap(err, "error writing file to signal mount cleanup on shutdown") }