I'm using GNU/LInux 4.4 on asw and I want to run a mongodb server (v3.4.3)
When I do the follwoing command, I can run the server and everything works:
sudo mongod --config /etc/mongod.conf
I see in the log file that the service is actively running and everything is fine.
When I try to run it as a service (I believe this is the recommended way in production) I get a permission error message
sudo service mongod start
In the log file I then get this error:
assertion: 28595:13: Permission denied src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 267
I have two questions:
- Why do I get this error and what can I do about it?
- When I run it as a service, it doesn't seem to be necessary to specify the config file, but he seems to read it correctly, as he writes the error message to the log file, which is specified in the config file. How does he automatically know which config file to use when I run it as a service?