aboutsummaryrefslogtreecommitdiff
path: root/zenstore/filecas.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2022-02-21 13:28:40 +0100
committerMartin Ridgers <[email protected]>2022-02-21 13:28:40 +0100
commit9910aa2db475c47ff97f4239e2393a940663685f (patch)
treedefc14379d3f7b1aefd0c893f0dcb0fcfd34f156 /zenstore/filecas.cpp
parentLinux compile fix (diff)
downloadzen-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.cpp2
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);