开发者

Unable to change the dbpath in mongodb through mongodb.conf

I am getting the following message

e开发者_C百科xception in initAndListen std::exception: boost::filesystem::exists: Permission denied: "/vol/mongodb", terminating

in /var/log/mongodb/mongodb.log

ls -al /vol/mongodb gives -

drwxrwxrwx 2 mongodb mongodb 4096 2011-08-07 12:10 ./

When I change the dbpath, back to the default, which is /var/lib/mongodb - it works fine.

How do I solve this?


I had the same problem initially and found it was caused by the mongodb user not having appropriate permissions on the parent directory.

I'd recommend checking /vol to ensure that the mongodb user can at least read files from that directory. May also need execute permissions too, and I suspect this will hold for each subsequent parent directory up to root.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜