Set permissions to 644 when creating a file via open()

This commit is contained in:
Martchus 2018-10-07 19:16:41 +02:00
parent 7b04bd8ef5
commit 7c4cd6ee7d
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ std::unique_ptr<std::basic_streambuf<char>> NativeFileStream::makeFileBuffer(con
::IoUtilities::throwIoFailure("CreateFileW failed");
}
#else
const auto fileDescriptor = ::open(path.data(), nativeParams.openFlags);
const auto fileDescriptor = ::open(path.data(), nativeParams.openFlags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (fileDescriptor == -1) {
::IoUtilities::throwIoFailure("open failed");
}