diff options
| author | Martin Ridgers <[email protected]> | 2022-02-21 13:28:40 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2022-02-21 13:28:40 +0100 |
| commit | 9910aa2db475c47ff97f4239e2393a940663685f (patch) | |
| tree | defc14379d3f7b1aefd0c893f0dcb0fcfd34f156 /zenstore/filecas.cpp | |
| parent | Linux compile fix (diff) | |
| download | zen-9910aa2db475c47ff97f4239e2393a940663685f.tar.xz zen-9910aa2db475c47ff97f4239e2393a940663685f.zip | |
If open(O_CREAT) is used then a file mode must be given
Diffstat (limited to 'zenstore/filecas.cpp')
| -rw-r--r-- | zenstore/filecas.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp index 5c7edef29..758c0665b 100644 --- a/zenstore/filecas.cpp +++ b/zenstore/filecas.cpp @@ -389,7 +389,7 @@ FileCasStrategy::InsertChunk(const void* const ChunkData, const size_t ChunkSize #else // Attempt to exclusively create the file. auto InternalCreateFile = [&] { - int Fd = open(Name.ShardedPath.c_str(), O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC); + int Fd = open(Name.ShardedPath.c_str(), O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, 0666); if (Fd >= 0) { fchmod(Fd, 0666); |