using soft link as source of shared folders for linux host

Discussions related to using VirtualBox on Linux hosts.
Post Reply
jcdole
Posts: 95
Joined: 3. May 2013, 18:25
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: WIN 7, WIN 10
Location: South west of france

using soft link as source of shared folders for linux host

Post by jcdole »

Hello.
I am using vb 6.1.2. and host and guest run opensuse leap 15.1. GA is installed.
Users are in vboxusers group

I have a folder named : "/win_lnx_disk1" in an ntfs partition which mode is 777
Using the shared folder manager, I can create a shared folder from "/win_lnx_disk1" on the host to "/win_lnx_shared1" on the linux VM

Now I have another try.
I have a folder named : "/virtual_data_vbox" in an xfs partition which mode is 1777
Now, in that folder "/virtual_data_vbox", i create a soft link from "/win_lnx_disk1" named "/win_lnx_disk1_lnk1"
Then starting the shared folder manager, and jumping to the folder "/virtual_data_vbox", i could not see the folder "/win_lnx_disk1_lnk1" ( soft link) gto create a new shared folder.

Note : previous shared folders has been removed

What is wrong.

Any help is welcome
jcdole
Posts: 95
Joined: 3. May 2013, 18:25
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: WIN 7, WIN 10
Location: South west of france

Re: using soft link as source of shared folders for linux host

Post by jcdole »

I have found another computer running virtualbox.
VB 6.0.122
Leap 15.0

there is at least one guest leap 15.0 and one guest running 15.1
I removed the shared folder on the guest 15.0
There is no shared folders on the guest 15.1
I did the following on the two guest :
On each running guest 15.0 and 15.1
1) create 3 folders by root : /folder1, /folder2, /folder3
2) chown the 3 folders to a standard user (not root)
3) chmod the 3 folders to 1777
4) stop all VM
On the host for each VM, using the shared folder manager
5-1)create a shared folder by choosing a folder path which is a link to a common ressource folder "win_linux_echange" of type ntfs with mode 1777 owned by a standard user (not root)
5-2) set auto-mount on
5-3) set mount point to /folder1 which was already created on the VM
6) repeat for shared folder2 and folder3

Conclusion : On the host running leap 15.0, That work on VM linuw leap 15.0 and does not work on VM leap 15.1 (kernel 4.12.14-lp151.28.13-default)

On my opening thread I made the test on a 15.1 host running kernel 4.12.14-lp151.28.36-default and the VM running the same kernel 4.12.14-lp151.28.36-default.
jcdole
Posts: 95
Joined: 3. May 2013, 18:25
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: WIN 7, WIN 10
Location: South west of france

Re: using soft link as source of shared folders for linux host

Post by jcdole »

I have redo my tests after removing the shared folders on the 2 guests and removing the folder to be shared by the hosts.
On the two computers, I have change the fstab as this :

Code: Select all

UUID=E236A92336A8FA25                       /win_disk2_pub      ntfs  users,permissions,auto   0  0
UUID=4AB297DBB297C9B9                      /win_disk1_pub      ntfs  users,permissions,auto   0  0
On the computer running leap 15.0 shared folders works on both hosts ( one running 15.0 and one running 15.1 )
On the computer running leap 15.1 shared folder failed on the only installed vm which run 15.1.

the two guests VM leap running 15.1 have the mount folders created by the current user (not root) with mode set 1777.
When the two VM started I saw a difference
1) On the computer running leap 15.0, the mount folder is mounted by user root of group vboxsf and the data are accessible.
2) On the computer running leap 15.1, is not mounted ( still owned by current user of group users ) and no data are accessible.
jcdole
Posts: 95
Joined: 3. May 2013, 18:25
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: WIN 7, WIN 10
Location: South west of france

Re: using soft link as source of shared folders for linux host

Post by jcdole »

any help is welcome !
Post Reply