问题描述
我将Windows和Virtualbox与RedHat一起使用,简单点:我创建了一个共享文件夹,以便可以在Windows OS上使用Eclipse并在Linux中进行一些测试.
I'm using Windows and Virtualbox with RedHat, putting it simple: I've created a shared folder so I can use Eclipse on my Windows OS and do some testing in Linux.
但是,我无法与用户访问共享文件夹,我已经以root用户身份登录并使用了chmod 777
,甚至将我的用户移动到了该文件夹的组中.
However, I can't access the shared folder with my user, I've logged in with root and used chmod 777
and even moved my user to the folder's group.
无论我做什么,结果都是一样的:
Whatever I do the result is the same:
/media/sf_sharedFolder/: Permission denied
我该怎么办?如何与用户访问共享文件夹?
What can I do? How can I access the shared folder with my user?
推荐答案
将自己添加到来宾VM的vboxsf
组中.
Add yourself to the vboxsf
group within the guest VM.
解决方案1
从终端运行sudo adduser $USER vboxsf
.
(在Suse上是sudo usermod --append --groups vboxsf $USER
)
Run sudo adduser $USER vboxsf
from terminal.
(On Suse it's sudo usermod --append --groups vboxsf $USER
)
要生效,您应该先注销然后再登录,否则您可能需要重新启动.
To take effect you should log out and then log in, or you may need to reboot.
解决方案2
编辑文件/etc/group
(您将需要root特权).查找行vboxsf:x:999
并在末尾的:yourusername
处添加-如果您没有sudo,请使用此解决方案.
Edit the file /etc/group
(you will need root privileges). Look for the line vboxsf:x:999
and add at the end :yourusername
-- use this solution if you don't have sudo.
要生效,您应该先注销然后再登录,否则您可能需要重新启动.
To take effect you should log out and then log in, or you may need to reboot.
这篇关于Virtualbox共享文件夹权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!