Commit 3beb5abc authored by skummer's avatar skummer

ZP-358 #comment check ownership of settings and user files #time 5m

git-svn-id: https://z-push.org/svn/z-push/trunk@1642 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 60c38c9a
......@@ -76,6 +76,7 @@ class FileStateMachine implements IStateMachine {
if (!touch($this->userfilename))
throw new FatalMisconfigurationException("Not possible to write to the configured state directory.");
Utils::FixFileOwner($this->userfilename);
}
/**
......@@ -361,7 +362,9 @@ class FileStateMachine implements IStateMachine {
$settings[self::VERSION] = $version;
ZLog::Write(LOGLEVEL_INFO, sprintf("FileStateMachine->SetStateVersion() saving supported state version, value '%d'", $version));
return file_put_contents($this->settingsfilename, serialize($settings));
$status = file_put_contents($this->settingsfilename, serialize($settings));
Utils::FixFileOwner($this->settingsfilename);
return $status;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment