Merge pull request #3018 from Random-Liu/perm-consistency-with-docker

Unpack should set 0755 when the parent directory doesn't exist.
This commit is contained in:
Michael Crosby 2019-02-21 10:37:03 -05:00 committed by GitHub
commit 759a889f3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,7 +194,7 @@ func applyNaive(ctx context.Context, root string, tr *tar.Reader, options ApplyO
parentPath = filepath.Dir(path)
}
if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
err = mkdirAll(parentPath, 0700)
err = mkdirAll(parentPath, 0755)
if err != nil {
return 0, err
}