Create directories for tar files with relaxed permissions

Docker-DCO-1.1-Signed-off-by: Alexey Kotlyarov <alexey@infoxchange.net.au> (github: koterpillar)
Upstream-commit: 2aeccdd3bb98760ab10e834c6c134bb76f664910
Component: engine
This commit is contained in:
Alexey Kotlyarov
2014-03-04 16:15:52 +11:00
parent 47387bf105
commit 2107371cbd
+1 -1
View File
@@ -403,7 +403,7 @@ func Untar(archive io.Reader, dest string, options *TarOptions) error {
parent := filepath.Dir(hdr.Name)
parentPath := filepath.Join(dest, parent)
if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
err = os.MkdirAll(parentPath, 600)
err = os.MkdirAll(parentPath, 0777)
if err != nil {
return err
}