From 8cc4072e9505830a006ff0bafc6771603f97bdd8 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb Date: Tue, 16 Nov 2021 13:07:22 -0800 Subject: [PATCH] DOCSP-19034-SELinux-read-permission --- source/includes/fact-selinux-redhat-customization.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/includes/fact-selinux-redhat-customization.rst b/source/includes/fact-selinux-redhat-customization.rst index 686262489dd..16374a7777e 100644 --- a/source/includes/fact-selinux-redhat-customization.rst +++ b/source/includes/fact-selinux-redhat-customization.rst @@ -41,7 +41,7 @@ Using a Custom MongoDB Directory Path .. code-block:: bash - restorecon -R -v + sudo restorecon -R -v For example: @@ -56,7 +56,7 @@ For example: sudo semanage fcontext -a -t mongod_var_lib_t '/mongodb/data.*' sudo chcon -Rv -u system_u -t mongod_var_lib_t '/mongodb/data' - restorecon -R -v '/mongodb/data' + sudo restorecon -R -v '/mongodb/data' - If using a non-default MongoDB log directory of ``/mongodb/log`` (e.g. if the log file path is ``/mongodb/log/mongod.log``): @@ -65,7 +65,7 @@ For example: sudo semanage fcontext -a -t mongod_log_t '/mongodb/log.*' sudo chcon -Rv -u system_u -t mongod_log_t '/mongodb/log' - restorecon -R -v '/mongodb/log' + sudo restorecon -R -v '/mongodb/log' Using a Custom MongoDB Port