Permission denied error when starting openmrs

I am excited about Bahmni. Today I have done a lot. One disappointment just late this night. I accidentally changed onwership to openmrs folder to vagrant and now it is not running. I am disappointed after all the work i have done. Here is the screenshot of the error i am getting. Any help will be appreciated to get back to where i was. When i stry to start the service it gives me the error below.

(Posted on behalf of a community member)

Here are my settings in my vagrant:

For /var (the owner is root).

For /var/log (the owner is root).

For /opt/openmrs (the owner is bahmni)

For all files under /opt/openmrs (the owner is bahmni)

So - you can: a) Either fix your folder owners by following the commands mentioned below:

So, maybe you can check the owner for each of the above folders (do an ls -l command to see). And then if owner isn’t correct, you can fire the command: “sudo chown -R bahmni:bahmni /opt/openmrs” (-R in the command means change owner for the mentioned directory and its sub-directories. In this case change owner to bahmni)

b) Or, you can choose to destroy your vagrant box, and recreate it again (no download needed). WARNING: This will LOSE any changes you made in the vagrant box. Therefore, if you need to keep data or file changes, then you will need to copy those changes OUT of the vagrant box, before you destroy it.

vagrant halt vagrant destroy vagrant up

Now you have a fresh vagrant box, exactly like you had when you first started. Then copy back you changes into the box.