Friday, November 7, 2014

MongoDB keyfile permissions are too open error

Creating an authenticated replicated set requires setting up of a secret key file on all the nodes.
In spite of creating the key file and putting the same file on all the nodes, you may encounter error stating that the permissions are too open:

permissions on /var/mongodb/conf/mongodb-keyfile are too open

 To solve this, here are the two things that you need to do to solve it:

  1.  Check that the owner of the key file and the user running mongod are same.
     Use chown command to change ownership to match if required.
      chown
  2.  Check permissions of the key file - should be 600 or 700.
     Use chmod command to make permissions more restrictive.
     chmod 600

No comments:

LinkWithin

Related Posts Plugin for WordPress, Blogger...