From c200b837e5cac8c7d3d243e2f59f75d7d4926e61 Mon Sep 17 00:00:00 2001 From: Paul van den Burg Date: Wed, 16 Oct 2019 12:16:31 +0200 Subject: [PATCH] Don't use broad 777 or 666 permissions --- scripts/composer/ScriptHandler.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php index e7c84f412c..37ee32743b 100644 --- a/scripts/composer/ScriptHandler.php +++ b/scripts/composer/ScriptHandler.php @@ -47,16 +47,16 @@ public static function createRequiredFiles(Event $event) { ], ]; drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php'); - $fs->chmod($drupalRoot . '/sites/default/settings.php', 0666); - $event->getIO()->write("Created a sites/default/settings.php file with chmod 0666"); + $fs->chmod($drupalRoot . '/sites/default/settings.php', 0664); + $event->getIO()->write("Created a sites/default/settings.php file with chmod 0664"); } - // Create the files directory with chmod 0777 + // Create the files directory with chmod 0775 if (!$fs->exists($drupalRoot . '/sites/default/files')) { $oldmask = umask(0); - $fs->mkdir($drupalRoot . '/sites/default/files', 0777); + $fs->mkdir($drupalRoot . '/sites/default/files', 0775); umask($oldmask); - $event->getIO()->write("Created a sites/default/files directory with chmod 0777"); + $event->getIO()->write("Created a sites/default/files directory with chmod 0775"); } }