diff --git a/files/package_pool.go b/files/package_pool.go index 650d8b5f..e8ceb12a 100644 --- a/files/package_pool.go +++ b/files/package_pool.go @@ -151,7 +151,7 @@ func (pool *PackagePool) Import(path string, hashMD5 string) error { } // create subdirs as necessary - err = os.MkdirAll(filepath.Dir(poolPath), 0755) + err = os.MkdirAll(filepath.Dir(poolPath), 0777) if err != nil { return err } diff --git a/files/public.go b/files/public.go index 4c130f8f..70795dac 100644 --- a/files/public.go +++ b/files/public.go @@ -32,7 +32,7 @@ func (storage *PublishedStorage) PublicPath() string { // MkDir creates directory recursively under public path func (storage *PublishedStorage) MkDir(path string) error { - return os.MkdirAll(filepath.Join(storage.rootPath, path), 0755) + return os.MkdirAll(filepath.Join(storage.rootPath, path), 0777) } // PutFile puts file into published storage at specified path @@ -87,7 +87,7 @@ func (storage *PublishedStorage) LinkFromPool(publishedDirectory string, sourceP baseName := filepath.Base(sourcePath) poolPath := filepath.Join(storage.rootPath, publishedDirectory) - err := os.MkdirAll(poolPath, 0755) + err := os.MkdirAll(poolPath, 0777) if err != nil { return err } diff --git a/http/download.go b/http/download.go index 82ce57f6..acf605bc 100644 --- a/http/download.go +++ b/http/download.go @@ -167,7 +167,7 @@ func (downloader *downloaderImpl) handleTask(task *downloadTask) { return } - err = os.MkdirAll(filepath.Dir(task.destination), 0755) + err = os.MkdirAll(filepath.Dir(task.destination), 0777) if err != nil { task.result <- fmt.Errorf("%s: %s", task.url, err) return