Page 1 of 1

Empty Shared Folder

Posted: 22. Sep 2015, 09:04
by madurham
I've shared a folder to my Lubuntu guest from my Windows host and the /media/sf_XXX folder is created but it is empty

The folder I am sharing from the host is a mapped drive with many documents in.
I've installed Vbox additions.
The user is in the vboxsf group.
The user can create and delete files within the shared folder but they don't show up in the Windows shared folder.

What is it I'm missing?

Re: Empty Shared Folder

Posted: 22. Sep 2015, 10:51
by mpack
If you are correct that the folder contains files, then I would guess that the user running VirtualBox doesn't have read access to that folder. Check the permissions.

Re: Empty Shared Folder

Posted: 22. Sep 2015, 12:21
by madurham
It's a domain admin account running VBox that has full control on the folder.

I had this working on a different Lubuntu VM a few months back. It seemed to just work that time.

Re: Empty Shared Folder

Posted: 24. Sep 2015, 09:11
by madurham
Nothing?

If there's more information I can provide I will.

Re: Empty Shared Folder

Posted: 24. Sep 2015, 13:33
by Perryg
I really do use the automount feature but have you tried the manual mount with options to see if it works?

Re: Empty Shared Folder

Posted: 5. Oct 2015, 11:17
by madurham
How would I go about doing a manual mount?

Re: Empty Shared Folder

Posted: 5. Oct 2015, 13:41
by Perryg
It is described in the users manual http://www.virtualbox.org/manual/ch04.h ... unt_manual
It is also described in detail in the howto section viewtopic.php?f=29&t=15868

Re: Empty Shared Folder

Posted: 1. Mar 2017, 19:55
by Oblivion9999
I apologize for the necro-post, but i just ran into this problem and found a solution that worked for me.

There are two part to the problem. The first is to ensure that the user(s) in question are part of the vboxsf group. I.e. look at /etc/group and ensure the vboxsf line looks like:

vboxsf:x:<gid>:<username>

(I my cases, <gid> = 999) If your username(s) is not after the colon, add it/them (as root/sudo, multiple usernames coma separated). You'll need to log out/back in for this to take effect, but wait on that if the second part pertains as well.

Part two: many modern linux distros populate a user's directory with default folders for Documents, Music, Videos, Downloads, etc. When VirtualBox creates the share, it's done as a symlink,
e.g. /home/<username>/Documents -> /media/sf_Documents

If a directory called Documents already exists, this symlinking dies apparently silently. The solution is to choose a different name for the share via the VirtualBox dialog or delete/rename the pre-existing Documents (or whatever) directory.

After a reboot, the auto-mount should work. At least it did for me.

HTH.

Re: Empty Shared Folder

Posted: 1. Mar 2017, 22:19
by socratis
Oblivion9999 wrote:When VirtualBox creates the share, it's done as a symlink, e.g. /home/<username>/Documents -> /media/sf_Documents
I would like to see some evidence about that, because I don't think I've never seen VirtualBox create a symlink.

Re: Empty Shared Folder

Posted: 25. Jan 2018, 21:15
by IPonder
For future seekers here: make sure what you are sharing is really a folder. On my Linux host I have /Black as a symbolic link somewhere else, and I am used to referring to /Black/something. When I set up my shared folder, I used /Black. The guest's shared folder was empty. Eventually I figured out I should have made the share to the actual directory. When I set it up that way, it worked.

Re: Empty Shared Folder

Posted: 26. Jan 2018, 09:03
by socratis
Thanks IPonder for the feedback. Just to be clear, this requirement is also in the User Manual, ch. 4.3 Shared Folders, the 2nd paragraph:
Shared folders must physically reside on the host and are then shared with the guest, which uses a special file system driver in the Guest Addition to talk to the host.