Skip to content

Commit

Permalink
fix: remove full access permissions (#11261)
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj authored and MyaLongmire committed Jul 6, 2022
1 parent 9573d81 commit 49f6c92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/ceph/ceph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func createTestFiles(dir string, st *SockTest) error {
writeFile := func(prefix string, i int) error {
f := sockFile(prefix, i)
fpath := filepath.Join(dir, f)
return os.WriteFile(fpath, []byte(""), 0777)
return os.WriteFile(fpath, []byte(""), 0644)
}
return tstFileApply(st, writeFile)
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/directory_monitor/directory_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (monitor *DirectoryMonitor) Init() error {

// Finished directory can be created if not exists for convenience.
if _, err := os.Stat(monitor.FinishedDirectory); os.IsNotExist(err) {
err = os.Mkdir(monitor.FinishedDirectory, 0777)
err = os.Mkdir(monitor.FinishedDirectory, 0755)
if err != nil {
return err
}
Expand All @@ -328,7 +328,7 @@ func (monitor *DirectoryMonitor) Init() error {
// If an error directory should be used but has not been configured yet, create one ourselves.
if monitor.ErrorDirectory != "" {
if _, err := os.Stat(monitor.ErrorDirectory); os.IsNotExist(err) {
err := os.Mkdir(monitor.ErrorDirectory, 0777)
err := os.Mkdir(monitor.ErrorDirectory, 0755)
if err != nil {
return err
}
Expand Down

0 comments on commit 49f6c92

Please sign in to comment.