How do you mount a Virtualbox shared folder? Group or permissions issue?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
notorab
Posts: 10
Joined: 6. Nov 2019, 07:48

How do you mount a Virtualbox shared folder? Group or permissions issue?

Post by notorab »

Does anyone know the procedure for a non-root user to gain access to Virtualbox shared folders?

This was fairly straightforward in Debian, however I'm having challenges with FreeBSD. It looks like a group and permissions issue. In Debian, I simply created a group "vboxsf", added my unprivileged user to it, chgrp the mount folder and then mounted. I tried this in FreeBSD I used this procedure, however the group gets changed on the folder to "wheel" after mounting the shared folder.

Your guidance appreciated.
$ mkdir /mnt/srcr

$ ls -ld /mnt/srcr
drwxr-xr-x  2 root  vboxsf  512 Nov  6 00:03 /mnt/srcr

$ sudo mount -t vboxvfs Source /mnt/srcr

$ ls -ld /mnt/srcr
drwxr-xr-x  1 root  wheel  576 Oct 14 21:45 /mnt/srcr

$ whoami
np
$ pwd
/mnt/srcr
$ ls /mnt/src
drwx------  10 root  wheel  320 Oct 14 21:35 X/
$ ls /mnt/src/X
ls: X/: Permission denied
Last edited by socratis on 6. Nov 2019, 08:19, edited 1 time in total.
Reason: Enclosed the information in [quote][pre] tags for better readability
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: How do you mount a Virtualbox shared folder? Group or permissions issue?

Post by socratis »

notorab wrote:In Debian, I simply created a group "vboxsf"
I think that merely the installation of the Guest Additions (GAs) does that for you, you don't have to create the group yourself. Are you installing the official GAs? The following will tel...

We need to see a complete VBox.log, from a complete VM run, where the problem occurs:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe or recreate the problem / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply