Skip to content

Commit 21525f3

Browse files
authored
Merge pull request kubernetes#129217 from tallclair/revert-129214-kubelet-state-perms
Revert "Change default filestore permissions to 0700"
2 parents e818574 + 532607e commit 21525f3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pkg/kubelet/util/store/filestore.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ import (
2828
const (
2929
// Name prefix for the temporary files.
3030
tmpPrefix = "."
31-
32-
// The default permission bits to set on the filestore directory.
33-
directoryPerm = 0700
3431
)
3532

3633
// FileStore is an implementation of the Store interface which stores data in files.
@@ -44,7 +41,7 @@ type FileStore struct {
4441

4542
// NewFileStore returns an instance of FileStore.
4643
func NewFileStore(path string, fs utilfs.Filesystem) (Store, error) {
47-
if err := fs.MkdirAll(path, directoryPerm); err != nil {
44+
if err := fs.MkdirAll(path, 0755); err != nil {
4845
return nil, err
4946
}
5047
return &FileStore{directoryPath: path, filesystem: fs}, nil
@@ -55,7 +52,7 @@ func (f *FileStore) Write(key string, data []byte) error {
5552
if err := ValidateKey(key); err != nil {
5653
return err
5754
}
58-
if err := f.filesystem.MkdirAll(f.directoryPath, directoryPerm); err != nil {
55+
if err := f.filesystem.MkdirAll(f.directoryPath, 0755); err != nil {
5956
return err
6057
}
6158

0 commit comments

Comments
 (0)