diff --git a/tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php b/tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php index 05c1d2e7e..fd47d9a74 100644 --- a/tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php +++ b/tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php @@ -44,9 +44,10 @@ class iTopConfigParserTest extends ItopTestCase parent::tearDown(); if ($this->conf_exists) { // restoring config that was in place before the test - @chmod($this->sConfigPath, 0770); // RWX for owner and group, nothing for others : else we will have permission denied ! - rename($this->tmpSavePath, $this->sConfigPath); - @chmod($this->sConfigPath, 0444); + $sBackupConfigFileContent = file_get_contents($this->tmpSavePath); + $hItopConfigFile = @fopen($this->sConfigPath, 'w'); + fwrite($hItopConfigFile, $sBackupConfigFileContent); + fclose($hItopConfigFile); } }