From fb6ac2c0b35a43b430fa1ce465191d22c87c9dc1 Mon Sep 17 00:00:00 2001 From: Fabian Terhorst Date: Tue, 17 Dec 2024 10:39:13 +0100 Subject: [PATCH] fix(vfs): linux create call --- code/components/vfs-impl-server/src/PlatformDevice.Posix.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/components/vfs-impl-server/src/PlatformDevice.Posix.cpp b/code/components/vfs-impl-server/src/PlatformDevice.Posix.cpp index 0daa85b160..956f2cdcc1 100644 --- a/code/components/vfs-impl-server/src/PlatformDevice.Posix.cpp +++ b/code/components/vfs-impl-server/src/PlatformDevice.Posix.cpp @@ -38,8 +38,7 @@ Device::THandle LocalDevice::OpenBulk(const std::string& fileName, uint64_t* ptr Device::THandle LocalDevice::Create(const std::string& filename, bool createIfExists, bool append) { - mode_t mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; - int flags = O_CREAT; + int flags = O_CREAT|O_WRONLY; if (createIfExists) { flags |= O_TRUNC; @@ -50,7 +49,7 @@ Device::THandle LocalDevice::Create(const std::string& filename, bool createIfEx flags |= O_APPEND; } - int fd = open(filename.c_str(), flags, mode); + int fd = open(filename.c_str(), flags, 0755); if (fd < 0) {