From ffd41230a6aa970a754cf9c712c483420d372d06 Mon Sep 17 00:00:00 2001 From: Ian Bishop Date: Sat, 9 Jun 2018 15:11:28 +0200 Subject: [PATCH] Fix file permissions --- storage/file.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/file.go b/storage/file.go index 25621b1f..dd22a051 100644 --- a/storage/file.go +++ b/storage/file.go @@ -107,7 +107,7 @@ func CreateNativeZeroLengthFiles(info *metainfo.Info, dir string) (err error) { continue } name := filepath.Join(append([]string{dir, info.Name}, fi.Path...)...) - os.MkdirAll(filepath.Dir(name), 0750) + os.MkdirAll(filepath.Dir(name), 0777) var f io.Closer f, err = os.Create(name) if err != nil { @@ -192,9 +192,9 @@ func (fst fileTorrentImplIO) WriteAt(p []byte, off int64) (n int, err error) { n1 = int(fi.Length - off) } name := fst.fts.fileInfoName(fi) - os.MkdirAll(filepath.Dir(name), 0770) + os.MkdirAll(filepath.Dir(name), 0777) var f *os.File - f, err = os.OpenFile(name, os.O_WRONLY|os.O_CREATE, 0660) + f, err = os.OpenFile(name, os.O_WRONLY|os.O_CREATE, 0666) if err != nil { return }