mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Prefs fail if configDir is not writable
This commit is contained in:
parent
4237e3e53e
commit
d181e8018b
@ -151,9 +151,14 @@ class IniStore implements LoadInterface, FlushObserverInterface
|
|||||||
*/
|
*/
|
||||||
private function createDefaultIniFile()
|
private function createDefaultIniFile()
|
||||||
{
|
{
|
||||||
touch($this->preferencesFile);
|
// TODO: We should be able to work without preferences. Also we shouldn't store any
|
||||||
|
// prefs as long as we didn't change some.
|
||||||
|
if (! is_writable($this->configPath) || touch($this->preferencesFile) === false) {
|
||||||
|
throw new ConfigurationError(
|
||||||
|
sprintf('Unable to store "%s"', $this->preferencesFile)
|
||||||
|
);
|
||||||
|
}
|
||||||
chmod($this->preferencesFile, 0664);
|
chmod($this->preferencesFile, 0664);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user