I am running a Homestead virtual box. I installed mongodb recently and was able to type mongod and it would load as it should. Now though I get an error saying dbpath /data/db does not exist. The typical solution for that is to create /data/db and set the proper permissions. The problem is that I already have data, just not in that location. My site is able to connect to mongodb and access information...
I noticed my .0 and .ns file, which I assume are my data files, are actually saved in /var/lib/mongodb as well as a mongod.lock file
I tried setting my dbpath using "mongod --dbpath /var/lib/mongodb" to which I get an error:
exception in initAndListen: 10308 Unable to create/open lock file: /var/lib/mongodb/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
I've tried stopping mongod and then running the --dbpath command which produced the same error. I've also tried running in sudo