fix: remove full access permissions (#11261)

This commit is contained in:
Joshua Powers 2022-06-08 09:54:12 -06:00 committed by GitHub
parent 453e276718
commit a8ed6fd192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,7 @@ func createTestFiles(dir string, st *SockTest) error {
writeFile := func(prefix string, i int) error { writeFile := func(prefix string, i int) error {
f := sockFile(prefix, i) f := sockFile(prefix, i)
fpath := filepath.Join(dir, f) fpath := filepath.Join(dir, f)
return os.WriteFile(fpath, []byte(""), 0777) return os.WriteFile(fpath, []byte(""), 0644)
} }
return tstFileApply(st, writeFile) return tstFileApply(st, writeFile)
} }

View File

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