In VirtualBox, what is the best way to share a directory between an OS X host and Ubuntu guest?
- Host: Mac OS X 10.7.3
- Guest: Ubuntu 12.04
- Guest has a shared directory mounted via VirtualBox settings with Access=Full and Auto-Mount=Yes.
The problem with this setup is illustrated below. In my shared directory, I can't change the permissions at all (not a permissions denied error, but they just don't take effect).
Ubuntu 12.04 (guest):
% ls -l
total 0
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 1
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 10
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 2
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 3
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 4
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 5
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 6
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 7
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 8
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 9
Mac OS X 10.7.3 (host):
$ ls -l
total 0
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 1
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 10
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 2
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 3
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 4
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 5
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 6
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 7
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 8
-rw-r--r-- 1 <my-mac-user> staff 0 Apr 17 21:56 9
If I chmod on the guest, nothing changes:
% chmod +x 1 | ls -l 1 # guest
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 1
If I chmod on the host, it changes on the host but not on the guest:
$ chmod +x 1 | ls -l 1 # host
-rwxrwx--x 1 <my-mac-user> staff 0 Apr 17 21:56 1
% ls -l 1 # guest
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 1