Apply default umask in SetupEnvironment()

This change makes all filesystem artifacts--files and directories--being
created with the default umask.
This commit is contained in:
Hennadii Stepanov
2023-02-06 11:08:03 +00:00
parent 8a6219e543
commit 581f16ef34
4 changed files with 7 additions and 4 deletions

View File

@@ -86,7 +86,7 @@ bool GenerateAuthCookie(std::string *cookie_out)
std::string cookie = COOKIEAUTH_USER + ":" + HexStr(rand_pwd);
/** the umask determines what permissions are used to create this file -
* these are set to 077 in init.cpp.
* these are set to 0077 in util/system.cpp.
*/
std::ofstream file;
fs::path filepath_tmp = GetAuthCookieFile(true);