Skip to content

Commit

Permalink
Fixes codemodules install permissions (#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
0sewa0 committed Jul 5, 2022
1 parent f1ee562 commit 6a30529
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/cmd/operator/standalone.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package main
import (
"github.com/Dynatrace/dynatrace-operator/src/standalone"
"github.com/spf13/afero"
"golang.org/x/sys/unix"
)

func startStandAloneInit() error {
unix.Umask(0000)
standaloneRunner, err := standalone.NewRunner(afero.NewOsFs())
if err != nil {
return err
Expand Down
7 changes: 4 additions & 3 deletions src/installer/zip/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ func extractFileFromZip(fs afero.Fs, targetDir string, file *zip.File) error {
}

mode := file.Mode()
if isAgentConfFile(file.Name) {
mode = common.ReadWriteAllFileMode
}

if file.FileInfo().IsDir() {
return fs.MkdirAll(path, mode)
}

if isAgentConfFile(file.Name) {
mode = common.ReadWriteAllFileMode
}

if err := fs.MkdirAll(filepath.Dir(path), mode); err != nil {
return err
}
Expand Down

0 comments on commit 6a30529

Please sign in to comment.