1
votes

I successfully installed mongodb, then I get this error after running the mongod command:

2015-08-21T20:48:25.862+0530 I STORAGE [initandlisten] exception in initAndListen: 98 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating 2015-08-21T20:48:25.889+0530 I CONTROL [initandlisten] dbexit: rc: 100

I have even done this and got this result:

ls -ld /data/db/
drwxr-xr-x  2 root  wheel  68 Aug 21 20:45 /data/db/
1

1 Answers

0
votes

Give read write permission to db data folder and reopen your terminal and then try mongod. Good luck.