Thursday, January 23, 2014

Shared Folder in Ubuntu/RedHat/Oracle Linux VMs using Virtual Box

at 12:22 AM  |  No comments

One of the first things after installing an Ubuntu VM is that you would want to share a folder across from your host operating system. This method is independent of the host operating system you might be using.

Note: If you are using the latest Ubuntu OS(currently I am on 13.10), I would recommend to have your VirtualBox(currently 4.3.x) updated to the latest version as well. There are few VBox and Shared Folder issues that happen due to incompatibility and I had to reinstall entire ubuntu because of that.

A lot of blog posts suggests creating a shared folder in /mnt and mounting them manually using the mount command. Though all those techniques work perfectly, I feel that it is unnecessary work just to be geeky. Lets try and keep it simple and use the features available to us for enabling this so that most of the audience is able to accomplish this without much hassles.

Pre-Requisites

VBox Guest Additions is required for the below steps to be successful.

Step - 1 - Enable Shared Folder from Host OS.



Step - 2 - Enabling the Share in Ubuntu OS

Once you start Ubuntu VM, you would notice the share name appearing as sf_sharename on path /media/sf_sharename

The major problem faced here is that only root user has access to this shared folder and if you login from other user you would not be able to open it. This problem happens because shared folder belongs to the group vboxsf.

The way to solve this and give access to shared folder to your user is to add to vboxsf group by running the following command

sudo usermod -G vboxsf -a <yourusername>

PS:- Please restart Ubuntu VM for this to take effect.


To test if your user has got added to the group open file /etc/group and search for your user which should now be a part of vboxsf group.

Step - 3 

There is no step - 3. Have fun and leave comments if it was useful :)

Share
, , , Posted by Unknown
About the Author

I am a technology enthusiast, passionate about photography and music and loves to learn and share my stints through blogs, twitter, videos and other social media. You can follow me at @TarunnRPasrija

0 comments:

Labels

apple (1) evernote (1) howto (3) mac (1) osx (1) productivity (1) softwares (3) ubuntu (1) virtualbox (1)
Blogger templates. Proudly Powered by Blogger.