From 94f06f0946bd9d49d03ba0da057f2c28a2c8b05e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 28 Nov 2022 14:03:43 +0100 Subject: [PATCH] fs/StandardDirectory: use mode=0777 in mkdir() call Of course, mode=0700 is more secure, but allowing other users access to new directories is a choice the user should make via umask(). If the user-chosen umask allows everybody access, MPD should probably respect that. --- src/fs/StandardDirectory.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs/StandardDirectory.cxx b/src/fs/StandardDirectory.cxx index af86b6f13..761ffa0d5 100644 --- a/src/fs/StandardDirectory.cxx +++ b/src/fs/StandardDirectory.cxx @@ -308,7 +308,7 @@ GetAppRuntimeDir() noexcept #ifdef USE_XDG if (const auto user_dir = GetUserRuntimeDir(); !user_dir.IsNull()) { auto dir = user_dir / Path::FromFS("mpd"); - mkdir(dir.c_str(), 0700); + mkdir(dir.c_str(), 0777); return dir; } #endif