Page 1 of 1

Sharing Folders with symbolic links - linux host, linux guest

Posted: 30. Dec 2016, 21:30
by wb4alm
On my linux host I want to create a single shared directory that will contain symbolic links to other files on the host.

on the linux guest, i added my guest logon name to the vboxsf group

on the linux host, my userid there was added to the vboxuser group

on the Linux host, I created a folder called "VM_SharedFolders"
in that folder are two additional directories (one for each of two separate VM's.)
1) for a windows guest the folder was named "WIN7-M64"
2) for a linux guest, the folder was named "TestSystem"
in the "TestSystem" folder two symbolic links were created:
"pgm_install1" and "pgm_install2" (both are symbolic links to real file folders)

On the Host, the symbolic links point to the correct real folders.
bill@wb4alm-07:~/VM_SharedFolders$ ls -lah
total 24K
drwxrwxr-x 4 bill bill 4.0K Dec 30 11:15 .
drwxr-xr-x 75 bill bill 12K Dec 30 11:15 ..
drwxrwxr-x 2 bill bill 4.0K Dec 30 11:15 WIN7-M64
drwxrwxr-x 2 bill bill 4.0K Dec 30 11:20 TestSystem

bill@wb4alm-07:~/VM_SharedFolders/TestSystem
$ ls -lah
total 8.0K
drwxrwxr-x 2 bill bill 4.0K Dec 30 11:20 .
drwxrwxr-x 4 bill bill 4.0K Dec 30 11:15 ..
lrwxrwxrwx 1 bill bill 56 Dec 30 11:20 pgm_install1 -> /home/bill/Install/pgm1
lrwxrwxrwx 1 bill bill 52 Dec 30 11:20 pgm_install2 -> /home/bill/Install/pgm2


On the Linux Guest the "pgm_install1" and "pgm_install2" links are displayed in red in response to a "ls -lah" command, and of course, nothing is accessable.

bill@TestSystem:/media/sf_TestSystem$ ls -lah
total 8.0K
drwxrwx--- 1 root vboxsf 4.0K Dec 30 11:20 .
drwxr-xr-x 4 root root 4.0K Dec 30 11:35 ..
lrwxrwx--- 1 root vboxsf 56 Dec 30 11:20 pgm_install1 -> /home/bill/Install/pgm1
lrwxrwx--- 1 root vboxsf 52 Dec 30 11:20 pgm_install2 -> /home/bill/Install/pgm2

What did I miss doing?

Re: Sharing Folders with symbolic links - linux host, linux guest

Posted: 30. Dec 2016, 21:49
by Perryg
By default VirtualBox does not allow symlinks. You need to enable them using VBoxManage and setting extradata to allow it. See the following and keep in mind that it may not work especially when using automount ( i do not like or use it ). Persistant manual mounts allow for much more/better control.
https://www.virtualbox.org/ticket/13486

Re: Sharing Folders with symbolic links - linux host, linux guest

Posted: 30. Dec 2016, 23:36
by wb4alm
Thank you for the quick reply.

I have allowed and disallowed symbolic links and it makes no difference.

Reading between the lines, I think what is occurring is that the guest file system is trying to resolve the links inside the guest system, rather then the "shared support" trying to follow the links in the host system.

I have another way to do what I wanted to do, so I will follow that rabbit down the hole...

again, thank you for the assistance. (It has been a long while sence I used VirtualBox - I see a lot of improvements, and my hat's off to the developers!!!