From badfc77339441d5a9cf7f2893b840590dd73613a Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Mon, 25 May 2015 00:12:51 +0200 Subject: [PATCH] Change permissions of newly created files and directories (fixes #1339) --- internal/model/rwfolder.go | 2 +- internal/model/sharedpullerstate.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/model/rwfolder.go b/internal/model/rwfolder.go index 4eabef793..9c2c0f24e 100644 --- a/internal/model/rwfolder.go +++ b/internal/model/rwfolder.go @@ -541,7 +541,7 @@ func (p *rwFolder) handleDir(file protocol.FileInfo) { realName := filepath.Join(p.dir, file.Name) mode := os.FileMode(file.Flags & 0777) if p.ignorePerms { - mode = 0755 + mode = 0777 } if debug { diff --git a/internal/model/sharedpullerstate.go b/internal/model/sharedpullerstate.go index ba3dcd7bf..93eecc87a 100644 --- a/internal/model/sharedpullerstate.go +++ b/internal/model/sharedpullerstate.go @@ -115,7 +115,7 @@ func (s *sharedPullerState) tempFile() (io.WriterAt, error) { return nil, err } } - fd, err := os.OpenFile(s.tempName, flags, 0644) + fd, err := os.OpenFile(s.tempName, flags, 0666) if err != nil { s.failLocked("dst create", err) return nil, err