From f001e99fcd37b7271cc3e843d21958b460e87f93 Mon Sep 17 00:00:00 2001 From: stefan-work <51439505+stefan-work@users.noreply.github.com> Date: Fri, 20 Mar 2020 23:32:15 +0100 Subject: [PATCH] create the final file with mode 0666 for multipart-uploads (#9173) NAS gateway creates non-multipart-uploads with mode 0666. But multipart-uploads are created with a differing mode of 0644. Both modes should be equal! Else it leads to files with different permissions based on its file-size. This patch solves that by using 0666 for both cases. --- pkg/ioutil/append-file_nix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ioutil/append-file_nix.go b/pkg/ioutil/append-file_nix.go index 416ed8621..f82367a9f 100644 --- a/pkg/ioutil/append-file_nix.go +++ b/pkg/ioutil/append-file_nix.go @@ -25,7 +25,7 @@ import ( // AppendFile - appends the file "src" to the file "dst" func AppendFile(dst string, src string) error { - appendFile, err := os.OpenFile(dst, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644) + appendFile, err := os.OpenFile(dst, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0666) if err != nil { return err }