[#1719] neofs-cli: Save object with proper permissions

`curl` uses 0644, for example.

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-08-23 17:20:20 +03:00 committed by Pavel Karpy
parent 871fae8321
commit 40f1cf36e1

View file

@ -53,7 +53,7 @@ func getObject(cmd *cobra.Command, _ []string) {
if filename == "" {
out = os.Stdout
} else {
f, err := os.OpenFile(filename, os.O_CREATE|os.O_WRONLY, os.ModePerm)
f, err := os.OpenFile(filename, os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
common.ExitOnErr(cmd, "", fmt.Errorf("can't open file '%s': %w", filename, err))
}