diff --git a/source/includes/fact-selinux-redhat-options.rst b/source/includes/fact-selinux-redhat-options.rst index aeab0e76b97..b042ceb746a 100644 --- a/source/includes/fact-selinux-redhat-options.rst +++ b/source/includes/fact-selinux-redhat-options.rst @@ -145,7 +145,7 @@ Using a Custom MongoDB Directory Path .. code-block:: bash - restorecon -R -v + sudo restorecon -R -v For example: @@ -160,7 +160,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``): @@ -169,7 +169,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