summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/src/cli.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 48490ddf4c5..58cb61bb417 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -459,6 +459,11 @@ main (int argc, char *argv[])
int ret = -1;
glusterfs_ctx_t *ctx = NULL;
+ if (geteuid ()) {
+ printf ("Only super user can run this command\n");
+ return EPERM;
+ }
+
ret = glusterfs_globals_init ();
if (ret)
return ret;