I have been using VirtualBox for awhile now but I mostly use Windows as the host machine. I just had setup few Linux boxes as VirtualBox host and found a need to save files in the host as I normally do snapshots and clean 'em up.
Mounting a shared folder is easy, what caught me was that I can't change ownership of the folder created under the shared folders. So my regular user account can't create files.
I realized that mount actually accepts options as to who would have access to the mounted folder, so to mount with read/write access to a user, do:
uid=1000 is the user ID of the user. For example, I have a user named timus, to get the ID, you can do:
timus@ubu1110:~$ cat /etc/passwd | grep timus
timus:x:1000:1000:timus,,,:/home/timus:/bin/bash
As can be seen, timus uid is 1000 and group ID is 1000 as well.
userdat is the VirtualBox shared folder name.
/mnt/userdat is the mount point
Keywords for easy search:
user userland VirtualBox shared folders read write
Mounting a shared folder is easy, what caught me was that I can't change ownership of the folder created under the shared folders. So my regular user account can't create files.
I realized that mount actually accepts options as to who would have access to the mounted folder, so to mount with read/write access to a user, do:
Where:sudo mount -t vboxsf -o rw,uid=1000 userdat /mnt/userdat
uid=1000 is the user ID of the user. For example, I have a user named timus, to get the ID, you can do:
timus@ubu1110:~$ cat /etc/passwd | grep timus
timus:x:1000:1000:timus,,,:/home/timus:/bin/bash
As can be seen, timus uid is 1000 and group ID is 1000 as well.
userdat is the VirtualBox shared folder name.
/mnt/userdat is the mount point
Keywords for easy search:
user userland VirtualBox shared folders read write
Comments