Skip to content

Commit

Permalink
fix permissions for temporary file
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Samoylov committed Aug 21, 2019
1 parent a3d7ffe commit 3cf8662
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions phpfpm/phpfpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ type Pool struct {
MemoryUsage MemoryUsage `json:"memory_usage"`
InternedStringsUsage InternedStringsUsage `json:"interned_string_usage"`
OpcacheStatistics OpcacheStatistics `json:"opcache_statistics"`
Scripts []string `json:"scripts"`
}

type FPMPool struct {
Expand Down Expand Up @@ -191,6 +192,10 @@ func (p *Pool) Update() (err error) {
return p.error(err)
}

if err := os.Chmod(tmpfile.Name(), 0644); err != nil {
return p.error(err)
}

env := map[string]string{
"SCRIPT_FILENAME": tmpfile.Name(),
"SCRIPT_NAME": tmpfile.Name(),
Expand Down

0 comments on commit 3cf8662

Please sign in to comment.