From 581f751582d91d63f476b40bf6af4d19d33f404f Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Mon, 22 Aug 2022 10:36:31 -0700
Subject: [PATCH] Issue #2232051 by andypost, andyceo, tayzlor, smustgrave,
 moshe weitzman: Unnessessary chmod during config write

---
 core/lib/Drupal/Core/Config/FileStorage.php | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/core/lib/Drupal/Core/Config/FileStorage.php b/core/lib/Drupal/Core/Config/FileStorage.php
index 01b070697135..fe202a3e0ed6 100644
--- a/core/lib/Drupal/Core/Config/FileStorage.php
+++ b/core/lib/Drupal/Core/Config/FileStorage.php
@@ -154,10 +154,7 @@ public function write($name, array $data) {
       $status = @file_put_contents($target, $encoded_data);
     }
     if ($status === FALSE) {
-      throw new StorageException('Failed to write configuration file: ' . $this->getFilePath($name));
-    }
-    else {
-      $this->getFileSystem()->chmod($target);
+      throw new StorageException('Failed to write configuration file: ' . $target);
     }
 
     $this->fileCache->set($target, $data);
-- 
GitLab