Commit d7b069fb authored by Saad Ali's avatar Saad Ali

Merge pull request #23793 from pmorie/configmap-nonroot

Make ConfigMap volume readable as non-root
parents c9b6e89a e838ff28
...@@ -341,6 +341,15 @@ func (w *AtomicWriter) newTimestampDir() (string, error) { ...@@ -341,6 +341,15 @@ func (w *AtomicWriter) newTimestampDir() (string, error) {
return "", err return "", err
} }
// 0755 permissions are needed to allow 'group' and 'other' to recurse the
// directory tree. do a chmod here to ensure that permissions are set correctly
// regardless of the process' umask.
err = os.Chmod(tsDir, 0755)
if err != nil {
glog.Errorf("%s: unable to set mode on new temp directory: %v", w.logContext, err)
return "", err
}
return tsDir, nil return tsDir, nil
} }
...@@ -408,7 +417,6 @@ func (w *AtomicWriter) createUserVisibleFiles(payload map[string][]byte) error { ...@@ -408,7 +417,6 @@ func (w *AtomicWriter) createUserVisibleFiles(payload map[string][]byte) error {
} }
} }
} }
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment