From f55359b3acc8a67143e977e27d25090ac8e706ce Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 29 Jul 2015 10:21:12 +0100 Subject: [PATCH] Fix created directories not obeying umask --- local/local.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/local.go b/local/local.go index cfbec5f09..d6909e4a2 100644 --- a/local/local.go +++ b/local/local.go @@ -210,7 +210,7 @@ func (f *FsLocal) Put(in io.Reader, remote string, modTime time.Time, size int64 // Mkdir creates the directory if it doesn't exist func (f *FsLocal) Mkdir() error { - return os.MkdirAll(f.root, 0770) + return os.MkdirAll(f.root, 0777) } // Rmdir removes the directory @@ -429,7 +429,7 @@ func (o *FsObjectLocal) Open() (in io.ReadCloser, err error) { // Update the object from in with modTime and size func (o *FsObjectLocal) Update(in io.Reader, modTime time.Time, size int64) error { dir := path.Dir(o.path) - err := os.MkdirAll(dir, 0770) + err := os.MkdirAll(dir, 0777) if err != nil { return err }