I want to create replica set and for that I had to configure mongodb for internal authentication. I did as per the mongodb documentation. I created key file and gave "600" access to file. I am using root user to start the server but getting following error.
2019-03-17T10:40:28.195+0300 I ACCESS [main] error opening file: /etc/key: Permission denied
I don't understand why for opening file user root is getting permission denied error though I've give read and write access to this file for user root.
Need urgent help to sort this issue.
posted 1 month ago
I am able to solve this issue.
Normally mongodb gets installed with user "mongod", so ownership has to be changed to mongod by using following command.
"sudo chown mongod:mongod /etc/key". then I was able to start the mongodb.
ice is for people that are not already cool. Chill with this tiny ad:
global solutions you can do at home or in your backyard