Create shared folder?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
RFrenette
Posts: 20
Joined: 10. Mar 2010, 01:44
Primary OS: Mac OS X Leopard
VBox Version: OSE Debian
Guest OSses: Ubuntu 9.10

Create shared folder?

Post by RFrenette »

Hi,

I looked for the directions on how to create a shared folder on an OS X (Lion) and Ubuntu (11.13) Guest, but was unable to find them.

I have done this in the past with an older version of VirtBox, but I'm having trouble with 4.1.8.

I created osx_share on the Host and ubuntu_share on the Guest. However, I'm unable to "connect" them using the following in /etc/rc/local on the Guest:

mount -t vboxsf osx_share /home/me/ubuntu_share

The following doesn't even work:

sudo mount -t vboxsf -o uid=1000 osx_share ubuntu_share

Thanks for any advice!

Rob
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Re: Create shared folder?

Post by stefan.becker »

Guest Additions are installed?

Read the manual how to set up automount of shared folders. Is much easier.
whisperycat
Posts: 6
Joined: 26. Apr 2009, 17:12
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux
Contact:

Re: Create shared folder?

Post by whisperycat »

The advice to "Read the manual" is good... up to a point.

On my host (Mac, OS X Snow Leopard) I created a directory to be the share.
In the VM (Linux, Ubuntu) I configured a connection to this folder (as per the manual) and set it to automount.

Then I logged in to Ubuntu as the only user existing on that system, i.e. the one which installed it. The shared folder is where I expected to find it - in the media directoy on Ubuntu - but the system tells me I have no permissions to access it since I aren't the owner. So, who *IS* the owner? 'root', apparently. So next I enabled root login and logged in as root, thinking I could modify the permissions on the shared folder.

As root I am able to access the shared folder and its contents with no problems, but any attempt to modify the sharing permissions are refused by the system. By this I mean, if I navigate to the shared folder in Ubuntu, as root, and right-click on the shared folder icon, I am presented with a tabbed window. The tabs are labelled 'Basic', 'Permissions' and 'Share'.

In the Permissions tab I *should* be able to set permissions for access by other users - I cannot do this.
I look at the section of Permissions entitled "Others -> Folder Access" and it is set to 'None'.
I select "Access Files" as the desired permissions, but this selection has no effect. "Access Files" is displayed for a split second and then it reverts to 'None'. NOTHING in these permissions can be changed by root!? How bizarre.

Next I think, hmmm, maybe I will check if my user is in the right group 'vboxsf'.

This is where I find there are no tools which will even list what groups a user does belong to - and this is as root user!

So in summary, I can create and access a shared folder only if I log in to the GUI as 'root', but not if I log in as the administrator who installed the OS.

One word - useless!!

One question - am I missing something here?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Create shared folder?

Post by Sasquatch »

Don't blame VB, get mad at Ubuntu for ditching that part. Open /etc/groups as root and add your username to the vboxsf group, or run the following command in a terminal, ran as root (or with sudo):

Code: Select all

usermod -aG vboxsf <your username>
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
whisperycat
Posts: 6
Joined: 26. Apr 2009, 17:12
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux
Contact:

Re: Create shared folder?

Post by whisperycat »

Thanks Sasquatch.
Sasquatch wrote:Don't blame VB, get mad at Ubuntu for ditching that part. Open /etc/groups as root and add your username to the vboxsf group, or run the following command in a terminal, ran as root (or with sudo):

Code: Select all

usermod -aG vboxsf <your username>
Post Reply