Mongodb startup error

  mongodb, question

Start mongod-config/usr/local/etc/mongod.conf
Error [main] failed globalinitialization: filenopten: failed to open “/usr/local/var/log/mongodb/mongo.log”

What is the problem

Verify that the /usr/local/var/log/mongodb/ directory exists and that the user who started mongods has write permission

Execute the following command

$ ls -al /usr/local/var/log/mongodb/

There should be the following similar outputs

total 56
 drwxr-xr-x  3 abc  admin     96 12 25 23:54 .
 drwxr-xr-x  7 abc  admin    224 10 23 22:41   ..
 -rw-r--r--  1 abc  admin  25444 12 26 20:25 mongo.log