Skip to content

Commit f9591fa

Browse files
Darioush Jalalifjl
authored andcommitted
eth: fix output file permissions in admin_exportChain (ethereum#26912)
* api: Use 0700 file permissions for ExportChain * change perm to 0644 * Update api.go --------- Co-authored-by: Felix Lange <fjl@twurst.com>
1 parent 7cdd301 commit f9591fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eth/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func (api *AdminAPI) ExportChain(file string, first *uint64, last *uint64) (bool
161161
return false, errors.New("location would overwrite an existing file")
162162
}
163163
// Make sure we can create the file to export into
164-
out, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.ModePerm)
164+
out, err := os.OpenFile(file, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
165165
if err != nil {
166166
return false, err
167167
}

0 commit comments

Comments
 (0)