Shared folder Mounting failed

Discussions about using Linux guests in VirtualBox.

Shared folder Mounting failed

Postby tarekmg » 25. May 2011, 07:26

I have VB 4.0.8 r71778 the host is win 7 Ultimate x64 and the guest is Ubuntu 11.04. I set the shared folder to ubuntu_share which is created in windows. When I am executing the following:

:~$ sudo mount -t vboxsf ubuntu_share win_shared
[sudo] password for :


I receive the next error that mounting failed.

/sbin/mount.vboxsf: mounting failed with the error: Protocol error
:~$


While the guest is open, if I removed the shared folder settings (Devices – Shared Folder) I receive an error saying “Broken Shared Folder”
But when I am adding again the same shared folder and apply the mount -t vboxsf command, Ubuntu accept and the shared folder is working correctly.

Is that means that each time I open the VB I have to remove the Shared Folder setting and put it back again??????????
tarekmg
 
Posts: 3
Joined: 3. May 2011, 07:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Ubuntu, WIndows

Re: Shared folder Mounting failed

Postby Perryg » 25. May 2011, 14:04

Did you set the share to auto-mount? If so then manual mounting is not necessary and will cause this error.
auto-mount places the shared mount in /media/sf_<share name>
Also your mount statement looks incorrect for Linux, as the final statement is to be the mount point and should have a / then the mount folder, and you must create the mount point yourself.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Shared folder Mounting failed

Postby gkersten » 30. May 2011, 14:28

I got the same error. My "/etc/fstab" contained a line to mount shared folders. I removed that line and then the error disappeared. The shared folder marked as auto-mount is still mounted in the location indicated by perryg. So check your "/etc/fstab" file.

The automount uses the option "gid=502". This is the "vboxsf" group. To get permission to use the share I added the my user id to group "vboxsf" in "/etc/group".

PS. Also I got a FAILED status in the boot process on mounting local file systems. After the change of the /etc/fstab the mounting of local filesystems gets status OK :).
gkersten
 
Posts: 1
Joined: 30. May 2011, 14:19
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: oel5

Re: Shared folder Mounting failed

Postby tarekmg » 31. May 2011, 09:27

Perryg wrote:Did you set the share to auto-mount? If so then manual mounting is not necessary and will cause this error.
auto-mount places the shared mount in /media/sf_<share name>


I tried both the Automount and then try to click on sf_ubuntu_shere but It is not working. An error that "The Folder Contents could not be displayed you do not have the permissions necessary to view the contents of "sf_ubuntu_share" displayed

Perryg wrote:Also your mount statement looks incorrect for Linux, as the final statement is to be the mount point and should have a / then the mount folder, and you must create the mount point yourself.


The statment is correct becasue it is actually working with me when I assign the folder while the VB is opened and Ubuntu is working and then I go to terminal and manualy mount the folder ubuntu_share to win_share
tarekmg
 
Posts: 3
Joined: 3. May 2011, 07:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Ubuntu, WIndows

Re: Shared folder Mounting failed

Postby Perryg » 31. May 2011, 13:38

An error that "The Folder Contents could not be displayed you do not have the permissions necessary to view the contents of "sf_ubuntu_share" displayed

This is the auto-mount and it means that you have not added your login name to the (guests) vboxsf group as explained in Chapter 4.3.2 Automatic mounting in your VirtualBox users manual.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Shared folder Mounting failed

Postby tarekmg » 4. Jun 2011, 11:33

I added my user name to the group vboxsf and now the folder can be opened but without refelecting the content of the folder as a shared folder between the client and guest. As if this is a local folder on the VB machine not a shared folder on the client machine that the VB machine can access its content.
However, manually is working fine on one condition that I should do it each time after the VB machine is on.
tarekmg
 
Posts: 3
Joined: 3. May 2011, 07:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Ubuntu, WIndows

Re: Shared folder Mounting failed

Postby calydon » 17. Oct 2011, 23:30

This is an extremely important salient point and it it's glossed over in the majority of the online tips that I've found. Even in the official documentation it's almost an afterthought. "You didn't add the user to the vboxsf group? Duh! "

It's such a Linuxy type of oversight. The marjority of new Ubuntu users probably don't even know to add a user to an existing group (and it's harder than ever in Oneiric Ocelot.

Here's how - hope you find it as helpful as I did.

http://www.liberiangeek.net/2011/10/add ... ic-ocelot/


Perryg wrote:
An error that "The Folder Contents could not be displayed you do not have the permissions necessary to view the contents of "sf_ubuntu_share" displayed

This is the auto-mount and it means that you have not added your login name to the (guests) vboxsf group as explained in Chapter 4.3.2 Automatic mounting in your VirtualBox users manual.
calydon
 
Posts: 1
Joined: 17. Oct 2011, 23:23
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Shared folder Mounting failed

Postby remy » 15. Jan 2012, 23:29

Perryg wrote:Did you set the share to auto-mount? If so then manual mounting is not necessary and will cause this error.
auto-mount places the shared mount in /media/sf_<share name>
Also your mount statement looks incorrect for Linux, as the final statement is to be the mount point and should have a / then the mount folder, and you must create the mount point yourself.


Thanks Perryg !!

After disabling the auto-mount, the following command worked for me sudo mount.vboxsf sharedFolder /media/windows7share/ .
remy
 
Posts: 1
Joined: 15. Jan 2012, 23:24
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu


Return to Linux Guests

Who is online

Users browsing this forum: Bing [Bot] and 14 guests