Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the execute permission from the directory #3992

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 operator/pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func Unpack(file, targetPath string) error {

switch header.Typeflag {
case tar.TypeDir:
if err := os.Mkdir(targetPath+"/"+header.Name, 0755); err != nil {
if err := os.Mkdir(targetPath+"/"+header.Name, 0700); err != nil {
return err
}
case tar.TypeReg:
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
2 changes: 1 addition & 1 deletion pkg/karmadactl/cmdinit/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func DeCompress(file, targetPath string) error {

switch header.Typeflag {
case tar.TypeDir:
if err := os.Mkdir(targetPath+"/"+header.Name, 0755); err != nil {
if err := os.Mkdir(targetPath+"/"+header.Name, 0700); err != nil {
return err
}
case tar.TypeReg:
Expand Down
Loading