Skip to content

Commit c200b83

Browse files
Don't use broad 777 or 666 permissions
1 parent bdaa8fd commit c200b83

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: scripts/composer/ScriptHandler.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ public static function createRequiredFiles(Event $event) {
4747
],
4848
];
4949
drupal_rewrite_settings($settings, $drupalRoot . '/sites/default/settings.php');
50-
$fs->chmod($drupalRoot . '/sites/default/settings.php', 0666);
51-
$event->getIO()->write("Created a sites/default/settings.php file with chmod 0666");
50+
$fs->chmod($drupalRoot . '/sites/default/settings.php', 0664);
51+
$event->getIO()->write("Created a sites/default/settings.php file with chmod 0664");
5252
}
5353

54-
// Create the files directory with chmod 0777
54+
// Create the files directory with chmod 0775
5555
if (!$fs->exists($drupalRoot . '/sites/default/files')) {
5656
$oldmask = umask(0);
57-
$fs->mkdir($drupalRoot . '/sites/default/files', 0777);
57+
$fs->mkdir($drupalRoot . '/sites/default/files', 0775);
5858
umask($oldmask);
59-
$event->getIO()->write("Created a sites/default/files directory with chmod 0777");
59+
$event->getIO()->write("Created a sites/default/files directory with chmod 0775");
6060
}
6161
}
6262

0 commit comments

Comments
 (0)