Commit 78996e25bcb4f9ddc55b2c061a8cdd55de0b7cca
1 parent
b0cff47b
Set only owner permissions on persistence files
Showing
1 changed file
with
2 additions
and
0 deletions
persistencefile.cpp
| ... | ... | @@ -268,6 +268,8 @@ void PersistenceFile::openWrite(const std::string &versionString) |
| 268 | 268 | throw std::runtime_error(formatString("Can't open '%s': %s", filePathTemp.c_str(), strerror(errno))); |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | + chmod(filePathTemp.c_str(), S_IRUSR | S_IWUSR); | |
| 272 | + | |
| 271 | 273 | openMode = FileMode::write; |
| 272 | 274 | |
| 273 | 275 | writeCheck(buf.data(), 1, MAGIC_STRING_LENGH, f); | ... | ... |