From 09cb795587772b60ba102f4369ab3f4501cdc01a Mon Sep 17 00:00:00 2001 From: Subha sree Mohankumar Date: Thu, 2 Nov 2017 15:09:37 +0530 Subject: storage/posix : options to override umask Options "create-mask" and "create-directory-mask" are added to remove the mode bits set on a file or directory when its created. Default value of these options is 0777. Options "force-create-mode" and "force-create-directory" sets the default permission for a file or directory irrespective of the clients umask. Default value of these options is 0000. Command to set option: volume set storage. The valid value range from 0000 to 0777. Updates #301 Change-Id: Ia33d13f2117202ca55a056c747ccc3674eb8bae1 Signed-off-by: Subha sree Mohankumar --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 8ec8a3125ee..7750914705e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -1,4 +1,4 @@ -/* + /* Copyright (c) 2013 Red Hat, Inc. This file is part of GlusterFS. @@ -2823,6 +2823,26 @@ struct volopt_map_entry glusterd_volopt_map[] = { .voltype = "storage/posix", .op_version = GD_OP_VERSION_4_0_0, }, + { .option = "force-create-mode", + .key = "storage.force-create-mode", + .voltype = "storage/posix", + .op_version = GD_OP_VERSION_4_0_0, + }, + { .option = "force-directory-mode", + .key = "storage.force-directory-mode", + .voltype = "storage/posix", + .op_version = GD_OP_VERSION_4_0_0, + }, + { .option = "create-mask", + .key = "storage.create-mask", + .voltype = "storage/posix", + .op_version = GD_OP_VERSION_4_0_0, + }, + { .option = "create-directory-mask", + .key = "storage.create-directory-mask", + .voltype = "storage/posix", + .op_version = GD_OP_VERSION_4_0_0, + }, { .key = "storage.bd-aio", .voltype = "storage/bd", .op_version = 3 -- cgit