Chmod 400 on key file not working

for the vagrant “database” in course m310 chmod 400 on the keyfile doesnt seem to work
because of which im not able to setup a Replica set with keyfile authentication (“file permissions too open error”)

because of the above error im not able to complete the homework regarding roles

find the screen shot for more clarity

please help regarding this ,im not able to proceed in the course because of this issue

Hi @Gopi_58003,

The keyfile must be created in the vagrant Ubuntu VM, not the shared drive. You can’t chmod on a Windows OS.

can i use a diffrent filesystem rather than the " /shared " in the vagrant “database” to avoid this permission issue

Are you trying to complete a Homework/lab or are you working through a lecture? What’s the name of the Homework/lecture?

Homework 2.1 : Create Users for Different Tasks

i was able to do the homework for enabling keyfile authentication on replica set successfully

and change permission on keyfile happend without any hiccups

also i destroyed the vagrant database and spun it again

but the same thing is happening

Let’s see a screenshot of ls -l /

this seems to be working using the path “/home/vagrant” for the keyfile

thank you…

You can create a directory anywhere you choose, for example:
sudo mkdir -p /db/keyfile
sudo chown -R vagrant:vagrant /db/keyfile

Then create your keyfile there.

1 Like

Very good! :slight_smile::+1: