aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/prep_dir_for_privdrop.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/FICS/prep_dir_for_privdrop.cpp b/FICS/prep_dir_for_privdrop.cpp
index 478459b..0fc2519 100644
--- a/FICS/prep_dir_for_privdrop.cpp
+++ b/FICS/prep_dir_for_privdrop.cpp
@@ -119,8 +119,9 @@ prep_dir_for_privdrop(const char *path)
fs::recursive_directory_iterator dir_it(v_path);
uid_t uid = 0;
gid_t gid = 0;
- constexpr mode_t dir_mode = (S_IRWXU|S_IRGRP|S_IXGRP);
- constexpr mode_t file_mode = (S_IRUSR|S_IWUSR|S_IRGRP);
+ constexpr mode_t dir_mode = (S_IRWXU|S_IRWXG);
+ constexpr mode_t file_mode = (S_IRUSR|S_IWUSR|
+ S_IRGRP|S_IWGRP);
if (get_uid_and_gid(uid, gid) == -1) {
throw std::runtime_error("failed to get uid/gid");