diff options
| author | Markus Uhlin <markus@nifty-networks.net> | 2025-11-29 09:48:23 +0100 |
|---|---|---|
| committer | Markus Uhlin <markus@nifty-networks.net> | 2025-11-29 09:48:23 +0100 |
| commit | 36cebc78ffac6e7997a803052b331de40c1ecb0e (patch) | |
| tree | 0e85f15b4b2b5d1d67be981270513f35a4c658c7 | |
| parent | 2f8fba4a9117796f1ff193f6a5ec364c281abdaf (diff) | |
Increased the dir/file permissions
| -rw-r--r-- | FICS/prep_dir_for_privdrop.cpp | 5 |
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"); |
