Ubuntu – VirtualBox problems writing to shared folders (Guest Additions installed)


I am trying to setup a shared folder from the host (ubuntu 10.10) to mount on a virtualized CentOS 5.5 with Guest Additions (4.0.0) installed (Guest addition features are working ie. seamless mode etc.).

I am able to successfully mount the share with:

mount -t vboxsf -o rw,exec,uid=48,gid=48 sf_html /var/www/html/

(uid and guid belong to the apache user/group)
the only problem is that once mounted and I try to write/create directories and files I get the following:

mkdir: cannot create directory `/var/www/html/test': Protocol error

I am using the proprietary version of VirtualBox version 4.0.0 r69151.

Has anyone had the same problem and been able to fix it or has any idea how to potentially fix this?

Another question, the reason for setting this up is this. Our production servers are on CentOS 5.5 however I am a great fan of Ubuntu and would like to develop on Ubuntu rather than CentOS. However in order to stay as close to the production environment I would like to virtualize CentOS to use a web server and use the shared folder as web root.
Anyone know whether this isn't a good idea? Has anyone successfully been able to set this up?

Thanks guys, your help is always much appreciated and if you need any more information please let me know.

Best Answer

One problem I had with shared folders is the name of the folder had to be the same as the name of the share AND it must already exist. There might be some wacky permissions issue in your case, but I would try the making names match first thing...