Vagrant shared folder access from infrastructure

I have installed 310 vagarnt and it is up and running both database and infrastructure. But when I put a file in shared. I could able to see from database vm but not from infrastructure.

/Users/praveenmuppala/university/m310/m310-vagrant-env/shared
praveens-MacBook-Pro:shared praveenmuppala$ ls -lrth
total 8
-rw-r–r-- 1 praveenmuppala staff 30B Feb 16 14:19 tempfile.txt
praveens-MacBook-Pro:shared praveenmuppala$

vagrant@database:~$ ls -lrth ~/shared/tempfile.txt

-rw-r–r-- 1 vagrant vagrant 30 Feb 16 19:19 /home/vagrant/shared/tempfile.txt

vagrant@database:~$

[vagrant@infrastructure ~]$ ls -lrth ~/shared/tempfile.txt

ls: cannot access /home/vagrant/shared/tempfile.txt: No such file or directory

[vagrant@infrastructure ~]$

could any of you please help me to resolve this.

Does /home/vagrant/shared even exist on the “database” box? I don’t recall.

I could able to see from database.

vagrant@database:~$ ls -lrth ~/shared/tempfile.txt

-rw-r–r-- 1 vagrant vagrant 30 Feb 16 19:19 /home/vagrant/shared/tempfile.txt

Sorry, doh! My bad. I meant on “infrastructure”. Does the box even have the shared folder?

yes it has.

[vagrant@infrastructure ~]$ cd ~/shared/

[vagrant@infrastructure shared]$ pwd

/home/vagrant/shared

[vagrant@infrastructure shared]$ ls -lrth

total 0

[vagrant@infrastructure shared]$

1 Like

@ venkata_praveen_62627

Looks like your infrastructure box didn’t provision properly. Did you see any error messages when you provisioned it? Since the database and infrastructure VMs both use the same external folder, they should match and I can’t make mine do anything else. Check your permissions on both systems using the least options: ls -l and see if they all match, If you have any additional information let us know. Thanks.

This is how I got around the ~/shared folder issue. It doesn’t work on mine also.
I download the lecture files directly into the ~/shared folder on the vagrant box.

  1. In the video lectures, RIGHT-CLICK on the lecture file you want to download. Choose COPY LINK.

  2. On the vagrant box:
    ~/shared:$ sudo wget [paste link here]

For example,
~/shared:$ sudo wget https://s3.amazonaws.com/edu-downloads.10gen.com/M310_2019_February/static/handouts/m034.zip

  1. Install the unzip program on the vagrant box.
    ~/shared:$ sudo apt-get install unzip

  2. Unzip the downloaded file.
    ~/shared:$ sudo unzip m034.zip

  3. ~/shared:$ ls -a

It should show the unzipped files.

1 Like

Yup, ditto… I wget or curl them directly into the box as well.

@ venkata_praveen_62627

Both of those options seem to be good workarounds. Post back here if you still have a problem; otherwise I’ll say this is solved. :wink:

this is resolved.I followed the above steps.

I had to do
sudo yum install unzip