Unable to change dbpath in mongodb via mongodb.conf

I get the following message
exception in initAndListen std :: exception: boost :: filesystem :: exists: Permission denied: "/ vol / mongodb", completion

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, let's go back to the default, which is / var / lib / mongodb - it works fine.

How to solve this?

+7
source share
1 answer

I had the same problem initially, and I found that this was because the mongodb user mongodb not have the appropriate permissions in the parent directory.

I would recommend checking /vol so that mongodb user can at least read files from this directory. Execution permissions may also be required, and I suspect that this will be held for each subsequent parent directory to the root.

+9
source

All Articles