Have you installed Ubuntu 11.04 as a virtual machine in VirtualBox but have had problems getting the Shared Folders feature to work? We were able to add a shared folder, but were unable to access it.
您是否已在VirtualBox中将Ubuntu 11.04安装为虚拟机,但在使“共享文件夹”功能正常工作时遇到问题? 我们能够添加一个共享文件夹,但是无法访问它。
We found the secret to accessing shared folders in an Ubuntu 11.04 virtual machine in VirtualBox. VirtualBox adds a user group called “vboxsf” to the Ubuntu 11.04 virtual machine. Any user that needs to have access to shared folders defined for that virtual machine need to be a member of that group. This article shows you how to add a user to the vboxsf group.
我们发现了在VirtualBox中访问Ubuntu 11.04虚拟机中共享文件夹的秘密。 VirtualBox将一个名为“ vboxsf”的用户组添加到Ubuntu 11.04虚拟机。 需要访问为该虚拟机定义的共享文件夹的任何用户都必须是该组的成员。 本文介绍如何将用户添加到vboxsf组。
Setting up shared folders in VirtualBox is fairly straightforward. Select Shared Folders from the Devices menu.
在VirtualBox中设置共享文件夹非常简单。 从设备菜单中选择共享文件夹。
The Shared Folders screen on the Settings dialog box displays. Use the buttons on the right side to add folders from your host machine to the Folders List. Refer to the help in VirtualBox for more information about adding shared folders.
显示“设置”对话框上的“共享文件夹”屏幕。 使用右侧的按钮将文件夹从主机添加到文件夹列表。 有关添加共享文件夹的更多信息,请参考VirtualBox中的帮助。
Once you have added your shared folders in VirtualBox, you must add users in the Ubuntu 11.04 virtual machine to the vboxsf group created by VirtualBox. To do this, select Administration | Users and Groups from the System menu in the Ubuntu virtual machine.
在VirtualBox中添加共享文件夹后,必须将Ubuntu 11.04虚拟机中的用户添加到VirtualBox创建的vboxsf组中。 为此,请选择“管理” |“管理”。 Ubuntu虚拟机中“系统”菜单中的“用户和组”。
On the Users Settings dialog box, click Manage Groups.
在“用户设置”对话框上,单击“管理组”。
The Groups settings dialog box displays. Scroll down in the list of groups and select the vboxsf group. Click Properties.
显示组设置对话框。 在组列表中向下滚动,然后选择vboxsf组。 单击属性。
On the Properties box for the vboxsf group, select the check boxes in the Group Members box for the users you want to add to the vboxsf group and click OK.
在vboxsf组的“属性”框中,选中要添加到vboxsf组的用户的“组成员”框中的复选框,然后单击“确定”。
To make this change, you must provide authentication. Enter your user account password in the Password edit box and click Authenticate.
要进行此更改,您必须提供身份验证。 在“密码”编辑框中输入您的用户帐户密码,然后单击“身份验证”。
You are returned to the Groups settings dialog box. Click Close and then also click Close on the Users Settings dialog box.
您将返回到“组设置”对话框。 单击“关闭”,然后在“用户设置”对话框上也单击“关闭”。
Now, you should be able to access your shared folders in the /media/sf_Ubuntu_11.04 folder.
现在,您应该可以访问/media/sf_Ubuntu_11.04文件夹中的共享文件夹。
NOTE: The name of the folder inside the media folder that contains the shared folders in VirtualBox always starts with “sf_” and continues with the name of your virtual machine.
注意:在VirtualBox中包含共享文件夹的媒体文件夹内的文件夹名称始终以“ sf_”开头,并以虚拟机名称继续。
Remember to add any new users you add to your Ubuntu 11.04 virtual machine to the vboxsf group if you want them to be able to access the shared folders.
如果希望他们能够访问共享文件夹,请记住将添加到Ubuntu 11.04虚拟机的所有新用户添加到vboxsf组。
翻译自: https://www.howtogeek.com/75705/access-shared-folders-in-a-virtualbox-ubuntu-11.04-virtual-machine/