github.com/argoproj/argo-cd/v3@v3.2.1/util/localconfig/file_perm_unix.go (about) 1 //go:build !windows 2 3 package localconfig 4 5 import ( 6 "fmt" 7 "os" 8 ) 9 10 func getFilePermission(fi os.FileInfo) error { 11 if fi.Mode().Perm() == 0o600 || fi.Mode().Perm() == 0o400 { 12 return nil 13 } 14 return fmt.Errorf("config file has incorrect permission flags %s, change the file permission either to 0400 or 0600", fi.Mode().Perm().String()) 15 }