Skip to content

Commit ca41e77

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-19034 SELinux command assumes read permission (#6163)
Co-authored-by: jason-price-mongodb <[email protected]>
1 parent e410a52 commit ca41e77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/includes/fact-selinux-redhat-options.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Using a Custom MongoDB Directory Path
151151
152152
.. code-block:: sh
153153
154-
restorecon -R -v </some/MongoDB/directory>
154+
sudo restorecon -R -v </some/MongoDB/directory>
155155
156156
For example:
157157
@@ -166,7 +166,7 @@ Using a Custom MongoDB Directory Path
166166
167167
sudo semanage fcontext -a -t mongod_var_lib_t '/mongodb/data.*'
168168
sudo chcon -Rv -u system_u -t mongod_var_lib_t '/mongodb/data'
169-
restorecon -R -v '/mongodb/data'
169+
sudo restorecon -R -v '/mongodb/data'
170170
171171
- If using a non-default MongoDB log directory of ``/mongodb/log``
172172
(e.g. if the log file path is ``/mongodb/log/mongod.log``):
@@ -175,7 +175,7 @@ Using a Custom MongoDB Directory Path
175175
176176
sudo semanage fcontext -a -t mongod_log_t '/mongodb/log.*'
177177
sudo chcon -Rv -u system_u -t mongod_log_t '/mongodb/log'
178-
restorecon -R -v '/mongodb/log'
178+
sudo restorecon -R -v '/mongodb/log'
179179
180180
181181
Using a Custom MongoDB Port

0 commit comments

Comments
 (0)