summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2019-07-08 11:34:49 +0530
committerAmar Tumballi <amarts@redhat.com>2019-07-23 03:23:48 +0000
commit70a735b75ac8ca942b212cc1c56441e9387f30e6 (patch)
treea1df3de470607e3f2e41301819bb6bb7049feece
parent2aa731a259ea457c07494e3c3edf6d5f7c02fe77 (diff)
core: use more restrictive mode while creating the directories
fixes: bz#1724024 Change-Id: I539fb7248b2cfc037ec29f1413ea648f9ec21ef2 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
-rw-r--r--libglusterfs/src/compat.c2
-rw-r--r--libglusterfs/src/store.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-hooks.c8
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c8
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c10
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c36
12 files changed, 43 insertions, 43 deletions
diff --git a/libglusterfs/src/compat.c b/libglusterfs/src/compat.c
index 877cda2..8a05a30 100644
--- a/libglusterfs/src/compat.c
+++ b/libglusterfs/src/compat.c
@@ -176,7 +176,7 @@ solaris_xattr_resolve_path(const char *real_path, char **path)
if (!ret && export_path) {
strcat(export_path, "/" GF_SOLARIS_XATTR_DIR);
if (lstat(export_path, &statbuf)) {
- ret = mkdir(export_path, 0777);
+ ret = mkdir(export_path, 0755);
if (ret && (errno != EEXIST)) {
gf_msg_debug(THIS->name, 0,
"mkdir failed,"
diff --git a/libglusterfs/src/store.c b/libglusterfs/src/store.c
index 06ef75e..d33c572 100644
--- a/libglusterfs/src/store.c
+++ b/libglusterfs/src/store.c
@@ -22,7 +22,7 @@ gf_store_mkdir(char *path)
{
int32_t ret = -1;
- ret = mkdir_p(path, 0777, _gf_true);
+ ret = mkdir_p(path, 0755, _gf_true);
if ((-1 == ret) && (EEXIST != errno)) {
gf_msg("", GF_LOG_ERROR, errno, LG_MSG_DIR_OP_FAILED,
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index c98cf48..5c75f2b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -6380,7 +6380,7 @@ glusterd_create_essential_dir_files(glusterd_volinfo_t *volinfo, dict_t *dict,
ret = -1;
goto out;
}
- ret = mkdir_p(buf, 0777, _gf_true);
+ ret = mkdir_p(buf, 0755, _gf_true);
if (ret) {
len = snprintf(errmsg, sizeof(errmsg),
"Unable to create %s"
@@ -6401,7 +6401,7 @@ glusterd_create_essential_dir_files(glusterd_volinfo_t *volinfo, dict_t *dict,
ret = -1;
goto out;
}
- ret = mkdir_p(buf, 0777, _gf_true);
+ ret = mkdir_p(buf, 0755, _gf_true);
if (ret) {
len = snprintf(errmsg, sizeof(errmsg),
"Unable to create %s"
diff --git a/xlators/mgmt/glusterd/src/glusterd-hooks.c b/xlators/mgmt/glusterd/src/glusterd-hooks.c
index 216cdf7..511a102 100644
--- a/xlators/mgmt/glusterd/src/glusterd-hooks.c
+++ b/xlators/mgmt/glusterd/src/glusterd-hooks.c
@@ -90,7 +90,7 @@ glusterd_hooks_create_hooks_directory(char *basedir)
priv = THIS->private;
snprintf(path, sizeof(path), "%s/hooks", basedir);
- ret = mkdir_p(path, 0777, _gf_true);
+ ret = mkdir_p(path, 0755, _gf_true);
if (ret) {
gf_msg(THIS->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create %s", path);
@@ -98,7 +98,7 @@ glusterd_hooks_create_hooks_directory(char *basedir)
}
GLUSTERD_GET_HOOKS_DIR(version_dir, GLUSTERD_HOOK_VER, priv);
- ret = mkdir_p(version_dir, 0777, _gf_true);
+ ret = mkdir_p(version_dir, 0755, _gf_true);
if (ret) {
gf_msg(THIS->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create %s", version_dir);
@@ -115,7 +115,7 @@ glusterd_hooks_create_hooks_directory(char *basedir)
ret = -1;
goto out;
}
- ret = mkdir_p(path, 0777, _gf_true);
+ ret = mkdir_p(path, 0755, _gf_true);
if (ret) {
gf_msg(THIS->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create %s", path);
@@ -129,7 +129,7 @@ glusterd_hooks_create_hooks_directory(char *basedir)
ret = -1;
goto out;
}
- ret = mkdir_p(path, 0777, _gf_true);
+ ret = mkdir_p(path, 0755, _gf_true);
if (ret) {
gf_msg(THIS->name, GF_LOG_CRITICAL, errno,
GD_MSG_CREATE_DIR_FAILED, "Unable to create %s", path);
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 9153348..f8e0bfe 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2679,7 +2679,7 @@ glusterd_set_shared_storage(dict_t *dict, char *key, char *value,
goto out;
}
- ret = mkdir_p(GLUSTER_SHARED_STORAGE_BRICK_DIR, 0777, _gf_true);
+ ret = mkdir_p(GLUSTER_SHARED_STORAGE_BRICK_DIR, 0755, _gf_true);
if (-1 == ret) {
snprintf(errstr, PATH_MAX,
"Failed to create shared "
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index bff02d5..6436799 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -309,7 +309,7 @@ _glusterd_quota_initiate_fs_crawl(glusterd_conf_t *priv,
GF_VALIDATE_OR_GOTO("glusterd", THIS, out);
GLUSTERD_GET_TMP_PATH(mountdir, "/");
- ret = sys_mkdir(mountdir, 0777);
+ ret = sys_mkdir(mountdir, 0755);
if (ret && errno != EEXIST) {
gf_msg(THIS->name, GF_LOG_WARNING, errno, GD_MSG_MOUNT_REQ_FAIL,
"failed to create temporary "
@@ -513,7 +513,7 @@ glusterd_quota_initiate_fs_crawl(glusterd_conf_t *priv,
goto out;
}
- ret = mkdir_p(DEFAULT_QUOTA_CRAWL_LOG_DIRECTORY, 0777, _gf_true);
+ ret = mkdir_p(DEFAULT_QUOTA_CRAWL_LOG_DIRECTORY, 0755, _gf_true);
if (ret) {
gf_msg(THIS->name, GF_LOG_ERROR, errno, GD_MSG_GLUSTERD_OP_FAILED,
"failed to create dir %s: %s", DEFAULT_QUOTA_CRAWL_LOG_DIRECTORY,
@@ -522,7 +522,7 @@ glusterd_quota_initiate_fs_crawl(glusterd_conf_t *priv,
}
GLUSTERD_GET_QUOTA_CRAWL_PIDDIR(pid_dir, volinfo, type);
- ret = mkdir_p(pid_dir, 0777, _gf_true);
+ ret = mkdir_p(pid_dir, 0755, _gf_true);
if (ret) {
gf_msg(THIS->name, GF_LOG_ERROR, errno, GD_MSG_GLUSTERD_OP_FAILED,
"failed to create dir %s: %s", pid_dir, strerror(errno));
@@ -2038,7 +2038,7 @@ glusterd_create_quota_auxiliary_mount(xlator_t *this, char *volname, int type)
fclose(file);
}
- ret = sys_mkdir(mountdir, 0777);
+ ret = sys_mkdir(mountdir, 0755);
if (ret && errno != EEXIST) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_MOUNT_REQ_FAIL,
"Failed to create auxiliary "
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index 5733729..d440a71 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -255,7 +255,7 @@ glusterd_handle_defrag_start(glusterd_volinfo_t *volinfo, char *op_errstr,
glusterd_store_perform_node_state_store(volinfo);
GLUSTERD_GET_DEFRAG_DIR(defrag_path, volinfo, priv);
- ret = mkdir_p(defrag_path, 0777, _gf_true);
+ ret = mkdir_p(defrag_path, 0755, _gf_true);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_CREATE_DIR_FAILED,
"Failed to create "
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index f1fc06b..3cd9a50 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -524,7 +524,7 @@ glusterd_copy_geo_rep_session_files(char *session, glusterd_volinfo_t *snap_vol)
goto out;
}
- ret = mkdir_p(snap_session_dir, 0777, _gf_true);
+ ret = mkdir_p(snap_session_dir, 0755, _gf_true);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DIR_OP_FAILED,
"Creating directory %s failed", snap_session_dir);
@@ -642,7 +642,7 @@ glusterd_snapshot_backup_vol(glusterd_volinfo_t *volinfo)
}
/* Create trash folder if it is not there */
- ret = sys_mkdir(trashdir, 0777);
+ ret = sys_mkdir(trashdir, 0755);
if (ret && errno != EEXIST) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DIR_OP_FAILED,
"Failed to create trash directory, reason : %s",
@@ -663,7 +663,7 @@ glusterd_snapshot_backup_vol(glusterd_volinfo_t *volinfo)
/* Re-create an empty origin volume folder so that restore can
* happen. */
- ret = sys_mkdir(pathname, 0777);
+ ret = sys_mkdir(pathname, 0755);
if (ret && errno != EEXIST) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DIR_OP_FAILED,
"Failed to create origin "
@@ -736,7 +736,7 @@ glusterd_copy_geo_rep_files(glusterd_volinfo_t *origin_vol,
GLUSTERD_GET_SNAP_GEO_REP_DIR(snapgeo_dir, snap_vol->snapshot, priv);
- ret = sys_mkdir(snapgeo_dir, 0777);
+ ret = sys_mkdir(snapgeo_dir, 0755);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DIR_OP_FAILED,
"Creating directory %s failed", snapgeo_dir);
@@ -4614,7 +4614,7 @@ glusterd_snap_brick_create(glusterd_volinfo_t *snap_volinfo,
goto out;
}
- ret = mkdir_p(snap_brick_mount_path, 0777, _gf_true);
+ ret = mkdir_p(snap_brick_mount_path, 0755, _gf_true);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DIR_OP_FAILED,
"creating the brick directory"
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 1ad3c74..ee1c01d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -1760,7 +1760,7 @@ glusterd_store_delete_volume(glusterd_volinfo_t *volinfo)
goto out;
}
- ret = sys_mkdir(trashdir, 0777);
+ ret = sys_mkdir(trashdir, 0755);
if (ret && errno != EEXIST) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_CREATE_DIR_FAILED,
"Failed to create trash "
@@ -1847,7 +1847,7 @@ glusterd_store_delete_snap(glusterd_snap_t *snap)
goto out;
}
- ret = sys_mkdir(trashdir, 0777);
+ ret = sys_mkdir(trashdir, 0755);
if (ret && errno != EEXIST) {
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_CREATE_DIR_FAILED,
"Failed to create trash "
@@ -3849,7 +3849,7 @@ glusterd_recreate_vol_brick_mounts(xlator_t *this, glusterd_volinfo_t *volinfo)
ret = sys_lstat(brickinfo->path, &st_buf);
if (ret) {
if (errno == ENOENT) {
- ret = mkdir_p(brick_mount_path, 0777, _gf_true);
+ ret = mkdir_p(brick_mount_path, 0755, _gf_true);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, errno,
GD_MSG_CREATE_DIR_FAILED, "Failed to create %s. ",
diff --git a/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c
index b801f95..8b0755b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c
@@ -25,7 +25,7 @@ glusterd_svc_create_rundir(char *rundir)
{
int ret = -1;
- ret = mkdir_p(rundir, 0777, _gf_true);
+ ret = mkdir_p(rundir, 0755, _gf_true);
if ((ret == -1) && (EEXIST != errno)) {
gf_msg(THIS->name, GF_LOG_ERROR, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create rundir %s", rundir);
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index b40322b..c2fefc1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -1342,7 +1342,7 @@ glusterd_validate_and_create_brickpath(glusterd_brickinfo_t *brickinfo,
char glusterfs_dir_path[PATH_MAX] = "";
int32_t len = 0;
- ret = sys_mkdir(brickinfo->path, 0777);
+ ret = sys_mkdir(brickinfo->path, 0755);
if (ret) {
if (errno != EEXIST) {
len = snprintf(msg, sizeof(msg),
@@ -1892,7 +1892,7 @@ _mk_rundir_p(glusterd_volinfo_t *volinfo)
this = THIS;
priv = this->private;
GLUSTERD_GET_VOLUME_PID_DIR(rundir, volinfo, priv);
- ret = mkdir_p(rundir, 0777, _gf_true);
+ ret = mkdir_p(rundir, 0755, _gf_true);
if (ret)
gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_CREATE_DIR_FAILED,
"Failed to create rundir");
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 0961f90..2cae48a 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -573,7 +573,7 @@ glusterd_crt_georep_folders(char *georepdir, glusterd_conf_t *conf)
ret = -1;
goto out;
}
- ret = mkdir_p(georepdir, 0777, _gf_true);
+ ret = mkdir_p(georepdir, 0755, _gf_true);
if (-1 == ret) {
gf_msg("glusterd", GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create " GEOREP " directory %s", georepdir);
@@ -587,7 +587,7 @@ glusterd_crt_georep_folders(char *georepdir, glusterd_conf_t *conf)
" is longer than PATH_MAX");
goto out;
}
- ret = mkdir_p(DEFAULT_LOG_FILE_DIRECTORY "/" GEOREP, 0777, _gf_true);
+ ret = mkdir_p(DEFAULT_LOG_FILE_DIRECTORY "/" GEOREP, 0755, _gf_true);
if (-1 == ret) {
gf_msg("glusterd", GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create " GEOREP " log directory");
@@ -603,7 +603,7 @@ glusterd_crt_georep_folders(char *georepdir, glusterd_conf_t *conf)
" is longer than PATH_MAX");
goto out;
}
- ret = mkdir_p(DEFAULT_LOG_FILE_DIRECTORY "/" GEOREP "-slaves", 0777,
+ ret = mkdir_p(DEFAULT_LOG_FILE_DIRECTORY "/" GEOREP "-slaves", 0755,
_gf_true);
if (-1 == ret) {
gf_msg("glusterd", GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
@@ -620,7 +620,7 @@ glusterd_crt_georep_folders(char *georepdir, glusterd_conf_t *conf)
" is longer than PATH_MAX");
goto out;
}
- ret = mkdir_p(DEFAULT_LOG_FILE_DIRECTORY "/" GEOREP "-slaves/mbr", 0777,
+ ret = mkdir_p(DEFAULT_LOG_FILE_DIRECTORY "/" GEOREP "-slaves/mbr", 0755,
_gf_true);
if (-1 == ret) {
gf_msg("glusterd", GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
@@ -1286,7 +1286,7 @@ glusterd_init_var_run_dirs(xlator_t *this, char *var_run_dir,
if ((-1 == ret) && (ENOENT == errno)) {
/* Create missing dirs */
- ret = mkdir_p(abs_path, 0777, _gf_true);
+ ret = mkdir_p(abs_path, 0755, _gf_true);
if (-1 == ret) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
@@ -1448,7 +1448,7 @@ init(xlator_t *this)
}
if ((-1 == ret) && (ENOENT == errno)) {
- ret = mkdir_p(workdir, 0777, _gf_true);
+ ret = mkdir_p(workdir, 0755, _gf_true);
if (-1 == ret) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
@@ -1495,7 +1495,7 @@ init(xlator_t *this)
exit(1);
}
- ret = mkdir_p(GLUSTER_SHARED_STORAGE_BRICK_DIR, 0777, _gf_true);
+ ret = mkdir_p(GLUSTER_SHARED_STORAGE_BRICK_DIR, 0755, _gf_true);
if (ret) {
gf_msg(this->name, GF_LOG_CRITICAL, 0, GD_MSG_DIR_OP_FAILED,
"Unable to create "
@@ -1550,7 +1550,7 @@ init(xlator_t *this)
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
@@ -1566,7 +1566,7 @@ init(xlator_t *this)
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
@@ -1581,7 +1581,7 @@ init(xlator_t *this)
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
@@ -1596,7 +1596,7 @@ init(xlator_t *this)
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
@@ -1612,7 +1612,7 @@ init(xlator_t *this)
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create logs directory %s"
@@ -1625,7 +1625,7 @@ init(xlator_t *this)
if ((len < 0) || (len >= sizeof(storedir))) {
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create nfs directory %s"
@@ -1638,7 +1638,7 @@ init(xlator_t *this)
if ((len < 0) || (len >= sizeof(storedir))) {
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create bitrot directory %s", storedir);
@@ -1649,7 +1649,7 @@ init(xlator_t *this)
if ((len < 0) || (len >= sizeof(storedir))) {
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create scrub directory %s", storedir);
@@ -1660,7 +1660,7 @@ init(xlator_t *this)
if ((len < 0) || (len >= sizeof(storedir))) {
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create glustershd directory %s"
@@ -1673,7 +1673,7 @@ init(xlator_t *this)
if ((len < 0) || (len >= sizeof(storedir))) {
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create quotad directory %s"
@@ -1686,7 +1686,7 @@ init(xlator_t *this)
if ((len < 0) || (len >= sizeof(storedir))) {
exit(1);
}
- ret = sys_mkdir(storedir, 0777);
+ ret = sys_mkdir(storedir, 0755);
if ((-1 == ret) && (errno != EEXIST)) {
gf_msg(this->name, GF_LOG_CRITICAL, errno, GD_MSG_CREATE_DIR_FAILED,
"Unable to create glustershd directory %s"