diff --git a/source/providers/file_provider.cpp b/source/providers/file_provider.cpp index 5569471e3..cd026d899 100644 --- a/source/providers/file_provider.cpp +++ b/source/providers/file_provider.cpp @@ -104,7 +104,7 @@ namespace hex::prv { ::CloseHandle(handle); } #else - auto handle = ::open(path.data(), O_RDWR | O_CREAT); + auto handle = ::open(this->m_path.data(), 0644); truncate(handle, newSize - 1); diff --git a/source/views/view_hexeditor.cpp b/source/views/view_hexeditor.cpp index 9a2f0d87c..34b1487f9 100644 --- a/source/views/view_hexeditor.cpp +++ b/source/views/view_hexeditor.cpp @@ -641,7 +641,7 @@ namespace hex { ::SetEndOfFile(handle); ::CloseHandle(handle); #else - auto handle = ::open(path.data(), O_RDWR | O_CREAT); + auto handle = ::open(path.data(), O_RDWR | O_CREAT, 0644); if (handle == -1) return false;