解決 VirtualBox裡Ubuntu的共用資料夾無法訪問 之問題

來源:互聯網
上載者:User

原文標題:You do not have the permissions necessary to view the contents of ‘shared_folder’
原文連結:http://darrenma.wordpress.com/2012/07/18/you-do-not-have-the-permissions-necessary-to-view-the-contents-of-shared_folder/


轉載於此。其實最重要的就是文末的最後一條命令。

sudo usermod -a -G vboxsf darren

darren是你自己的使用者名稱。比如我的是xwchen。
使用這個命令後,如果不能馬上生效,需要重啟一下系統。
這樣,我在Windows裡共用給VirtualBox裡Ubuntu的檔案夾就能訪問了。


I develop within Virtualbox(VB). Often I need to be able to share files and folders between my host machine(the machine VB is installed on) and my client machine(the OS installed in VB, in this case Ubuntu).

It’s easy to share a folder. If you follow these steps:

1) Open Virtualbox, select your OS on the left then click on Shared Folders on the right.

2) Click on the Green cross on the top right to add a new Shared Folder

3) Fill out the form by selecting which folder you want to shared between your machines. Check auto mount and Save.

4) Start up your Ubuntu now and navigate to /media and you will see your shared folder.

Easy right? But it’s not over. If you try to open this shared folder you’ll probably land up with this error: “You do not have the permissions necessary to view the contents of ‘shared_folder’ “

To fix this you need to add the correct permission group to your user. (Resource) but seeing as I use Ubuntu 12.04 I was unable to find Manage Groups anywhere. It seems that it’s hidden under gnome 2. (Resource)

If you are like me and want to install as little extra stuff onto your machine as possible then instead of using gnome tools or ubuntu tweak to manage the groups lets use the terminal. Just type

1 sudo usermod -a -G vboxsf darren

(and replace ‘darren’ with your username)

*NOTE the change will only be visible once you logout and login again! (Resource)

There you go. Now if you go to /media/ you’ll be able to see your shared folder and access it. I also like to make a symlink from there to my home directory to make it even easier to access.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.