Cannot see file in host-side shared folder that was created in guest

Discussions related to using VirtualBox on Linux hosts.
Post Reply
robertb1
Posts: 13
Joined: 12. Sep 2017, 19:51

Cannot see file in host-side shared folder that was created in guest

Post by robertb1 »

I'm sure this has been asked and answered but I can't find a solution.

I have a Ubuntu 18.04 Desktop host and Ubuntu 18.04 Server guest. I created a shared folder on the host at /mnt/raid2tb/Backups/2-Mail/Shared. I added Guest Additions to the guest and I see the folder at /media/sf_Shared, so it seems to be working. However, when I create a file TEST in my guest and save it into sf_Shared, I don't see the file when I check that folder in my host.

Host:
drwxrwxr-x 2 user user        4096 Nov  4 22:47 Shared
Guest:
ls -l /
drwxrwxr-x 1 root root        4096 Nov  4 22:47 media
ls -l /media/sf_Shared
-rw-rw-r-- 1 root vboxsf        15 Nov  4 23:35 TEST
Can someone help me understand what I need to do to see the same content in Shared from both the host and guest side? Thanks
Last edited by socratis on 5. Nov 2018, 09:35, edited 1 time in total.
Reason: Enclosed the information in [quote][pre] tags for better readability
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot see file in host-side shared folder that was created in guest

Post by socratis »

robertb1 wrote: I created a shared folder on the host at /mnt/raid2tb/Backups/2-Mail/Shared
I don't have a Linux host readily available, so I'm not sure how you managed to bypass the following restriction. From the user manual:
Shared folders must physically reside on the host and are then shared with the guest
Not sure if you can share something that's on a "/mnt/raid2tb". Is it physically on the server?

Other than that, are you a member of the 'vboxsf' group on the guest? Why don't you give 'rwxrwxrwx' to the host's "Shared" folder? Does it work the other way round?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot see file in host-side shared folder that was created in guest

Post by mpack »

I don't know if it's applicable to Ubuntu hosts, but I have seen this before in the physical world where the host file manager simply hadn't refreshed the memory copy of the file listing. A bit of reconfig changed the refresh strategy, normally at a small CPU cost.

Easy test: shut down the VM and reboot the host PC (i.e. force all buffers to be purged). Now look in the folder: is the file there? If yes then VirtualBox did it's job. Refreshing host folder views is a problem for you on your host.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Cannot see file in host-side shared folder that was created in guest

Post by socratis »

mpack wrote:I have seen this before in the physical world ... A bit of reconfig changed the refresh strategy
Hmm... Interesting. What was the OS involved and what was the reconfig that you refer to?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
robertb1
Posts: 13
Joined: 12. Sep 2017, 19:51

Re: Cannot see file in host-side shared folder that was created in guest

Post by robertb1 »

Thanks.

Rebooting unfortunately didn't resolve this.
socratis wrote:Not sure if you can share something that's on a "/mnt/raid2tb". Is it physically on the server?
Yes, I have two physical RAID1 arrays on my machine. /mnt/raid/ is a 3-disk array where my VMs are stored and running. /mnt/raid2tb/ is a 2-disk array where I store my backups. I created /mnt/raid2tb/Backups/2-Mail/Shared physically on the host, shut down 2-Mail, then shared the folder in the GUI settings and set as automount.

On the VM, I can navigate to /media and see sf_Shared. I can create file on the VM and store it in sf_Shared. It's just that from the host I'm unable to see the file.
socratis wrote:Other than that, are you a member of the 'vboxsf' group on the guest? Why don't you give 'rwxrwxrwx' to the host's "Shared" folder? Does it work the other way round?
Yes, I add my user as a member of vboxsf. And I tried 777 permission on hosts Shared folder. I am still only able to see files created on host from host, and I can only see files created on guest from guest.

Any thoughts of what I should try next?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot see file in host-side shared folder that was created in guest

Post by mpack »

socratis wrote:
mpack wrote:I have seen this before in the physical world ... A bit of reconfig changed the refresh strategy
Hmm... Interesting. What was the OS involved and what was the reconfig that you refer to?
The client OS was Windows 7 64bit. The network share was on a business server. I Googled for a solution at the time which worked, but didn't retain it.
robertb1
Posts: 13
Joined: 12. Sep 2017, 19:51

Re: Cannot see file in host-side shared folder that was created in guest

Post by robertb1 »

Still haven't been able to resolve this, hoping one of you might have an additional suggestion on why there seems to be a wall in my shared folder between the host and guest. The folder itself is shared, but access to any content inside the folder seems limited to the machine that created it, e.g. the host can only see content saved to the shared folder by the host machine and the guest can only see content saved to the shared folder by the guest VM. Thanks
Post Reply