mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +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)) {
|
||||
$this->fail(sprintf($this->translate('Unable to create path: %s'), $configDir));
|
||||
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) {
|
||||
$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