Question Ans 2 Final Exam

How many directories must MongoDB have access to? Disregard the path to the configuration file itself.

The answer for this question should be 2 instead of 3. Only db path and log file directories access required.

because without access to keyfile folder, we can start mongod .
Only read permission on keyfile is enough to start mongod

Unfortunately that is not correct. MongoD will need at least read access to the /var/pki directory, otherwise the process cannot get the inode and thus cannot open the file.

Here’s a simple demonstration:

19

Despite being world-readable, the file /tmp/testdir/testfile cannot be read, because the directory is not world-readable.