diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-10-21 12:06:46 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-10-21 12:07:21 +0200 |
commit | fa9982b87ece21baafa08e0c17ca935ce29d7022 (patch) | |
tree | b3fce0c9ba42305fb7dc6824121d43d5935fc61a /pkg/util/utils.go | |
parent | b6fdfa041a3e0f0a754c1f3a6edd8bc0be6f6ed8 (diff) | |
download | podman-fa9982b87ece21baafa08e0c17ca935ce29d7022.tar.gz podman-fa9982b87ece21baafa08e0c17ca935ce29d7022.tar.bz2 podman-fa9982b87ece21baafa08e0c17ca935ce29d7022.zip |
rootless: write storage overrides to the conf file
make sure the user overrides are stored in the configuration file when
first created.
Closes: https://github.com/containers/libpod/issues/2659
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/util/utils.go')
-rw-r--r-- | pkg/util/utils.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go index 0190b106d..d9a84e4e5 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -318,7 +318,7 @@ func WriteStorageConfigFile(storageOpts *storage.StoreOptions, storageConf strin if err := os.MkdirAll(filepath.Dir(storageConf), 0755); err != nil { return err } - storageFile, err := os.OpenFile(storageConf, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666) + storageFile, err := os.OpenFile(storageConf, os.O_RDWR|os.O_TRUNC, 0600) if err != nil { return errors.Wrapf(err, "cannot open %s", storageConf) } |