It just took me 2 hours to figure this out so I thought I would post my solution.
I have Ubuntu running (I guess it's 9.04 amd64 desktop) inside VirtualBox (version 3.0.12) on a Windows Vista host.
I am trying to share a folder on Vista so that Ubuntu can see it.
There are countless forums on how to do this. However, no one seems to know that when you mount the folder on Ubuntu, you can only copy to and from it as the root user, because the permissions are all jacked up thanks to NTFS and Ubuntu not interfacing correctly (I assume this is the issue...)
Anyway, here's what I did to solve the issue. I want my share to appear every time I boot.
I edited /etc/rc.local as root and added the line:
mount -t vboxsf -o uid=1000,gid=1000,dmode=774,fmode=774 sharename /mountpoint
Where sharename is the share name assigned when you create the share in VirtualBox, and /mountpoint is the folder you create to mount the file.
What this does is sets the ownership of the mount to the first user of the machine (1000)... alternately you can use your username instead of 1000. It then forces the permissions on all the directories and folders inside the share to 774 (owner and group can read write and execute, everyone else can read).
Adding this line to /etc/rc.local makes sure it is run every time the machine is restarted. I tried also adding it to fstab, but it didn't work because I don't think the vboxsf service is started yet at that point. Anyway, this appears to work nicely.
Hope that helps someone.
Wednesday, December 9, 2009
Subscribe to:
Comments (Atom)