File Structure Video Lecture

Unknowingly i wrote config file in /data/db (used storage.dbPath)…My file structure look like this…

I heard in File Structure lecture that if we do any changes in this path data may lost…what should i do to remove these --rw operrations?

Ideally, we should not touch these files. As per lecture, we should contact MongoDB support. But as this a lab for our learning purpose, we can modify the permission of all these files to -rwxrwxrwx. Please make sure Mongod process is down before modifying the permission. If something messed up, not to worry, we can re-provision the mongod.

I have had similar situation during the lab. I inadvertently started the Mongod process as a root user and then stopped it. As a result, few files’ ownership was changed to root:root. When I tried to start the Mongod process as service user, which is vagrant here, it did not start. I changed the ownership to vagrant:vagrant from root:root, and then started the Mongod process and it started.

In my personal opinion, more mess-up in the lab helps to learn more.

Note: Should not touch these files in real time scenario / production environment. Should contact MongoDB support for solution

If you do not have real data you can safely remove the files when mongod is not running.

Thank you both for your replies…i’ll contact MongoDB support team…

Hi Habeeba_Naaz_34696,

I would say, don’t worry about it until its throwing any issues. Don’t delete the files. Keep it as it is.

For further labs and assignments, I will strongly recommend create another directory (as per lab instructions) and continue with the work.


Yeah, don’t delete anything if it is NOT causing any issue. You can always copy the config file somewhere else and then start again. Of course don’t forget to stop mongod first.

If you really wanted to start fresh just remove the ‘machine’ in Virtual Box and re-run all the vagrant stuff right from the beginning.

Till now i have not got any issues…so i am continuing my work without deleting files.