From 2672c0ebe2900bc1df1622a2ae4f36c61bac35e8 Mon Sep 17 00:00:00 2001 From: Stefan Nica Date: Fri, 10 Jul 2020 12:31:01 +0200 Subject: [PATCH] Relax filesystem driver folder permissions to 0777 (cont) There was a previous PR relaxing the filsystem driver permissions for files and folders to 0666 and 0777 respectively [1][2], but it was incomplete. This is required to get the registry to honor the umask value. [1] https://github.com/docker/distribution/pull/1304/ [2] https://github.com/docker/distribution/issues/1295 Signed-off-by: Stefan Nica --- registry/storage/driver/filesystem/driver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/storage/driver/filesystem/driver.go b/registry/storage/driver/filesystem/driver.go index 8fc9d1ca..ef6cc972 100644 --- a/registry/storage/driver/filesystem/driver.go +++ b/registry/storage/driver/filesystem/driver.go @@ -260,7 +260,7 @@ func (d *driver) Move(ctx context.Context, sourcePath string, destPath string) e return storagedriver.PathNotFoundError{Path: sourcePath} } - if err := os.MkdirAll(path.Dir(dest), 0755); err != nil { + if err := os.MkdirAll(path.Dir(dest), 0777); err != nil { return err }