- Change the Default DB Path: Not able to launch mongod with vagrant user. Running with root user

WiredTiger error (13) [1566338815:729829][7711:0x7f92ed8ada80], wiredtiger_open: __posix_open_file, 715: /var/mongodb/db//WiredTiger.turtle: handle-open: open: Permission denied
2019-08-20T22:06:55.730+0000 E - [initandlisten] Assertion: 28595:13: Permission denied src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 486

Getting this error while trying to run mongod with vagrant as the user. Works fine with the root user

Hey @payal_40246

Did you first launch the daemon with sudo? If so then when trying to launch with a different your the files that were created in the first launch will be owned by root. You could try to change the ownership of the storage location.

sudo chown -R vagrant:vagrant /path/to/db

Or is all else fails just run

vagrant destroy
vagrant up
1 Like

Thanks! It worked after i detroyed vagrant and started with vagrant user.

2 Likes