I am trying to run eos and using the std docs - https://developers.eos.io/eosio-nodeos/docs/build-validation

I am trying - ~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf and I get the following -

trevor@ubuntu-s-4vcpu-8gb-lon1-01:~/opt/mongodb$ 2018-08-03T13:03:01.096+0000 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/home/trevor/opt/mongodb/log/mongodb.log"
~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf

I tried already chmod 755 on the log and checking the conf as per other posts here. Nothing worked. Here is the conf -

trevor@ubuntu-s-4vcpu-8gb-lon1-01:~/opt/mongodb$ more *conf
 destination: file
 path: /home/trevor/opt/mongodb/log/mongodb.log
 logAppend: true
 logRotate: reopen
 ipv6: true
 dbPath: /home/trevor/opt/mongodb/data

I have Ubuntu 18.04.

Any idea what could be the cause?

1 Answer 1


Run as sudo. That worked for me.

trevor@ubuntu-s-4vcpu-8gb-lon1-01:~/opt$ sudo ~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf & [1] 23948 trevor@ubuntu-s-4vcpu-8gb-lon1-01:~/opt$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.