Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongodb KeyFile too open permissions

I have created a three members replicaSet (in separated servers) following the tutorial on mongodb site.

I have configure in /etc/mongodb.conf the following:

fork=true

keyFile=/srv/mongodb/keyFile

And I have create the keyFile in that location and the server always told me "permissions are too open" in keyFile

What can be wrong?

Thanks in advance

like image 705
SeVeNDuS Avatar asked Feb 09 '13 15:02

SeVeNDuS


1 Answers

From the docs:

The key file must not have group or “world” permissions on UNIX systems

Therefore if you run this, you should be fine (substitute actual path):

chmod 600 /path/to/keyfile

You should also make sure that the keyfile is owned by the same user that you use to run the mongod/mongos processes, otherwise setting the permissions above will cause an error (only the user that owns the file can access it with 600 permissions).

like image 79
Adam Comerford Avatar answered Sep 22 '22 08:09

Adam Comerford