mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 00:34:03 +02:00
cli/setup: Issue an error if chmod fails when setting up the configuration directory
This commit is contained in:
parent
9c40372b61
commit
9de1b20d3c
@ -60,13 +60,16 @@ class ConfigCommand extends Command
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$mode = octdec($mode);
|
|
||||||
if (false === mkdir($configDir)) {
|
if (false === mkdir($configDir)) {
|
||||||
$this->fail(sprintf($this->translate('Unable to create path: %s'), $configDir));
|
$this->fail(sprintf($this->translate('Unable to create path: %s'), $configDir));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
chmod($configDir, $mode);
|
if (! chmod($configDir, octdec($mode))) {
|
||||||
|
$this->fail($this->translate(
|
||||||
|
'Unable to change the mode of the configuration directory'
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
if (chgrp($configDir, $group) === false) {
|
if (chgrp($configDir, $group) === false) {
|
||||||
$this->fail(sprintf($this->translate('Unable to change the group of "%s" to "%s".'), $configDir, $group));
|
$this->fail(sprintf($this->translate('Unable to change the group of "%s" to "%s".'), $configDir, $group));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user