Fixing excessive unix file permissions (#14791)

* Fixing excessive unix file permissions

* CL

* reduce the permission from 750 to 700
This commit is contained in:
hghaf099
2022-04-01 12:57:38 -04:00
committed by GitHub
parent 42b4af494e
commit 1740186e72
6 changed files with 10 additions and 7 deletions

View File

@@ -979,7 +979,7 @@ func (c *AgentCommand) storePidFile(pidPath string) error {
}
// Open the PID file
pidFile, err := os.OpenFile(pidPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o644)
pidFile, err := os.OpenFile(pidPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o600)
if err != nil {
return fmt.Errorf("could not open pid file: %w", err)
}