From 942530d5143b98a42ea132d32bff9739282d6590 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 7 Nov 2014 15:34:54 +0100 Subject: [PATCH] Ensure that the CLI successfully changed the group of the config directory refs #7163 --- application/clicommands/SetupCommand.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/clicommands/SetupCommand.php b/application/clicommands/SetupCommand.php index c204b226b..28eb8850a 100644 --- a/application/clicommands/SetupCommand.php +++ b/application/clicommands/SetupCommand.php @@ -105,7 +105,11 @@ class SetupCommand extends Command $old = umask(0); // Prevent $mode from being mangled by the system's umask ($old) chmod($path, $mode); umask($old); - chgrp($path, $group); + + if (chgrp($path, $group) === false) { + $this->fail(sprintf($this->translate('Unable to change the group of "%s" to "%s".'), $path, $group)); + return false; + } printf($this->translate("Successfully created configuration directory at: %s\n"), $path); }