VirtualBox Shared Folders Protocol Error in Ubuntu Guest
I was banging my head against my desk trying to make shared folders work in VirtualBox 1.64 on my WinXP notebook inside an Ubuntu 8.04 guest. I kept getting a “protocol error” failure.
Here’s the scenario I was working with:
- I created a Windows folder on my notebook to share to the guests – f:\shared2vms
- I added the folder to the shared folders properties of the Ubuntu VM and named it shared2vms
- I created a folder at /home/username/shared2vms to be the mount point of the VirtualBox shared folder in the Ubuntu guest
For a Linux guest in VirtualBox the command to use the shared folder is “mount -t vboxsf [shared folder name] [mount point]”
So, the command I was using
#sudo mount -t vboxsf shared2vms /home/user/shared2vms
After some creative Google -ing I luckily found this Virtualbox.org forum thread that solved the issue –
virtualbox.org :: View topic – Ubuntu 8.04beta guest shared folders. It wasn’t until I read the very last reply in this thread unit I got the answer for making it work. Here’s the body of that reply:
My environment:
VirtualBox 1.6
Host: Vista
Guest: Ubuntu 8.04
I found out that using
Code: sudo mount …
under Ubuntu 8.04 ends up with “protocol error”.
Running mount as root works.
To make user root available, you have to set root’s password:
Code: sudo passwd
CORRECTION:
Code: sudo mount …
works under one special condition:
Your current working directory must be outside the path of your mount point.
The above command to set the root password correctly is confusing even with the correction, but I used the following command:
#sudo passwd root
First you are prompted for your current user’s password, and then you are prompted to set the new UNIX password for the root user.
After switching to the super user
#su -
and entering the new root password I was able to correctly use the mount command.
#mount -t vboxsf /home/user /home/shared2vms
It even worked for the mount folder in my home directory contrary to the one special condition mentioned above. I was able to access the shared folder when I exited from the super user mode as well.












Hi.
You dont need to enable root access for shared folders. Check out the mount command with user access on this forum
http://forums.virtualbox.org/viewtopic.php?t=5825
Command goes something like this –
mount -t vboxsf sharefolder /point/to/mount -o user,uid=1000,gid=1000,exec,rw
Try
mount.vboxsf sharedfolder mountpoint/sharedfolder
…
alternatively, just use
sudo -i
to gain root access at console. then mount, and exit
For those who missed the point about not being in the path of your mount directory, here's what worked for me on Ubuntu:
$ sudo su
# cd /etc
# mount -t vboxsf -o uid=your_user_name,gid=your_user_name,umask=022 sharename /home/user/mntpoint
# exit
(the important thing is that your current directory is not in the path of the mount directory)
I added the additional mount options mainly so the directories and files will show up in normal colors in the console.
Also, I should mention that everything works fine in fstab.
Voni,
Thanks for taking us by the hand on this config!
Here is my solution not to be forced to be a root to read or write in shared folders : http://forum.videonoob.fr/viewtopic.php?f=36&t=171
Oops, it has already been said, sorry, i didn't read because the comment form is before the comments …
Bastien,
Thanks for the solution, and you convinced me to move the comments box to the bottom of the thread. It makes more sense to be there anyways!
Hey, i have been struggling without luck, tryed every option i found.
My share name is KubuntuShare and i want it tied to /var/www/ so i can easily deploy some scripts and watch them run.
Tryed :
mount -t vboxsf -o uid=33,gid=33 KubuntuShare /var/www/
mount -t vboxsf -o uid=silent,gid=silent,umask=022 KubuntuShare /var/www/
sudo mount -t vboxsf KubuntuShare /var/www/
And several other variations, with sudo, with sudo su, with su -, with diferent working directory, etc, and i couldnt get it up and running, i even installed Samba after and tryed a direct windows share but it didnt work.
Any ideas?
Heres a pic:
http://yfrog.com/0vsnapshot1kp
Omg. THANK YOU!
Omg. THANK YOU!
I have no idea what anybody here is talking about, but I had this same problem
http://stackoverflow.com/questions/2134135/rail...
and adding a password to root solved it. Thanks!
“Well , the view of the passage is totally correct ,your details is really reasonable and you guy give us valuable informative post, I totally agree the standpoint of upstairs. I often surfing on this forum coach outlet when I m free and I find there are so coach handbags much good information we can learn in this forum! ugg boots