From 64727894c4e32f92fc89b3422535a59166f3ae72 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 18 Jul 2008 14:15:18 +0000 Subject: [PATCH] set all permission bits on files and let umask handle reducing permissions --- src/file.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/file.cpp b/src/file.cpp index 8a9d8814c..c1b1a643c 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -173,7 +173,9 @@ namespace libtorrent std::string const& file_path = path.native_file_string(); #endif #else // if not windows - const mode_t permissions = S_IRWXU | S_IRGRP | S_IROTH; + // rely on default umask to filter x and w permissions + // for group and others + const mode_t permissions = S_IRWXU | S_IRWXG | S_IRWXO; std::string const& file_path = path.native_file_string(); #endif m_fd = ::open(file_path.c_str(), map_open_mode(mode), permissions);