after create required folder /var/mongod/db i use this command chown vagrant:vagrant /var/mongod/db to switch owner ship but not sucessful
sudoto change ownership from root to the vagrant user
-Roption to apply the changes to sub directories
- to do it at the mongod directory level, i.e. /var/mongod
that means we should type (at home)
sudo chown root:vagrant var/mongod
sudo chown -R vagrant:vagrant /var/mongodb
NB: Remember that the first slash is very important for these labs. And I think that the folder is called mongodb and not mongod so I’ve changed it for you.
Remember what I reminded you about… this also applies to creating (
mkdir) the directory.
I have fixed this thanks a lot
Closing this thread as the issue has been resolved.