Skip to content

Commit

Permalink
Remove the execute permission from the directory
Browse files Browse the repository at this point in the history
Signed-off-by: Tanggui Bian <softwarebtg@163.com>
  • Loading branch information
zishen committed Aug 24, 2023
1 parent c938785 commit a2b02e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion operator/pkg/tasks/init/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func runCrdsDownload(r workflow.RunData) error {
return err
}
if !exist {
if err := os.MkdirAll(crdsDir, 0755); err != nil {
if err := os.MkdirAll(crdsDir, 0700); err != nil {
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/karmadactl/cmdinit/kubernetes/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func initializeDirectory(path string) error {
return err
}
}
if err := os.MkdirAll(path, os.FileMode(0o755)); err != nil {
if err := os.MkdirAll(path, os.FileMode(0700)); err != nil {
return fmt.Errorf("failed to create directory: %s, error: %v", path, err)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/karmadactl/cmdinit/kubernetes/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func Test_initializeDirectory(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if tt.createPathInAdvance {
if err := os.MkdirAll("tmp", os.FileMode(0755)); err != nil {
if err := os.MkdirAll("tmp", os.FileMode(0700)); err != nil {
t.Errorf("create test directory failed in advance:%v", err)
}
}
Expand Down

0 comments on commit a2b02e5

Please sign in to comment.