6

I installed Guest Additions on my Ubuntu 10.04 VM running out of VirtualBox in order to enable directory sharing, following these instructions. Set the shared folder in the VirtualBox GUI and it mounted it on the VM, where it appeared fine.

However, when I tried going into the shared directory on the VM (located in /media), I could not cd into it nor change ownership or permissions, the commands returning without an error but not actually having done their job:

mysuser@ubnt-xdev:/media$ ls -la
total 12
drwxr-xr-x  4 root root   4096 2013-08-28 11:34 .
drwxr-xr-x 22 root root   4096 2013-08-28 10:48 ..
drwxr-xr-x  2 root root   4096 2013-08-28 11:29 cdrom
drwxrwx---  1 root vboxsf   68 2013-08-28 11:19 sf_vmshare
mysuser@ubnt-xdev:/media$ cd sf_v*
-bash: cd: sf_vmshare: Permission denied
mysuser@ubnt-xdev:/media$ sudo chown mysuser sf_vmshare
[sudo] password for mysuser: 
mysuser@ubnt-xdev:/media$ ls -la sf_vmshare
drwxrwx---  1 root vboxsf   68 2013-08-28 11:19 sf_vmshare
mysuser@ubnt-xdev:/media$ sudo chgrp mysuser sf_vmshare
mysuser@ubnt-xdev:/media$ ls -la sf_vmshare
drwxrwx---  1 root vboxsf   68 2013-08-28 11:19 sf_vmshare
mysuser@ubnt-xdev:/media$ sudo chmod 777 sf_vmshare
mysuser@ubnt-xdev:/media$ ls -la sf_vmshare
drwxrwx---  1 root vboxsf   68 2013-08-28 11:19 sf_vmshare

Which makes the shared directory unusable. The directory works fine on the host. Anybody know what is going on?

6

I figured it out, the user needs to be added to the vboxsf group:

sudo adduser mysuser vboxsf

Then restart the VM.

  • I think that you meant restart session or opening another login. – Braiam Aug 28 '13 at 16:53
  • 1
    Doesn't help for me. – reinierpost Mar 22 '16 at 18:03
  • doesn't help for me either. chmod not taking affect. – roocell Aug 3 '16 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.