Skip to content

Commit

Permalink
eth: fix output file permissions in admin_exportChain (#26912)
Browse files Browse the repository at this point in the history
* api: Use 0700 file permissions for ExportChain

* change perm to 0644

* Update api.go

---------

Co-authored-by: Felix Lange <[email protected]>
  • Loading branch information
darioush and fjl authored Mar 17, 2023
1 parent 58d0f64 commit ee8e83f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (api *AdminAPI) ExportChain(file string, first *uint64, last *uint64) (bool
return false, errors.New("location would overwrite an existing file")
}
// Make sure we can create the file to export into
out, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm)
out, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
if err != nil {
return false, err
}
Expand Down

0 comments on commit ee8e83f

Please sign in to comment.