Details
-
Bug
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
CentOS 7
*Location*: http://docs.mongodb.org/master/tutorial/install-mongodb-on-linux/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36
*Referrer*: https://www.google.com.br/
*Screen Resolution*: 1440 x 900
*repo*: docs
*source*: tutorial/install-mongodb-on-linux
CentOS 7 *Location*: http://docs.mongodb.org/master/tutorial/install-mongodb-on-linux/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36 *Referrer*: https://www.google.com.br/ *Screen Resolution*: 1440 x 900 *repo*: docs *source*: tutorial/install-mongodb-on-linux
Description
In the "Run MongoDB" section, when you change the data directory, if you are running enforced SELinux, you also need to change the permissions of the security context for that new directory. Setting the owner and group alone is not enough.
You change it with:
sudo chcon -R -u system_u -t mongod_var_lib_t /data/db
Solution originally found in: http://stackoverflow.com/questions/15229412/unable-to-create-open-lock-file-data-mongod-lock-errno13-permission-denied/15982017#comment45464578_15982017