Opened 13 months ago
Last modified 13 months ago
#21816 closed defect
Shared folders group owner set to root instead of vboxsf — at Version 4
| Reported by: | domp | Owned by: | |
|---|---|---|---|
| Component: | shared folders | Version: | VirtualBox-7.0.10 |
| Keywords: | vboxsf group owner | Cc: | |
| Guest type: | Linux | Host type: | Linux |
Description (last modified by )
Mounting a shared folders in a Linux guest VM, the owner group is set to root instead of vboxsf, this forbid the users to fully access to the folder.
Furthermore the permission set to files are quite strange, on the first level files have 664 (or 774), in deeper levels have 660 (or 770). (Not a VBox issue)
My VB host is Linux Mint 20.3, and guests where I observed the issue are MXLinux 23 and Linux Mint 21.2.
Step to reproduce the issue:
- Create a Shared Folder (I shared: Downloads);
- Add current VM Guest user to vboxsf group
sudo usermod -aG vboxsf $(whoami)and restart the guest; - Create mountpoint;
- Check mountpoint owners are
<myuser>:<myuser>; - Manually mount shared folder:
sudo mount -t vboxsf <sf_name> <sf_mountpoint>
- Check mountpoint owners, you'll find
root:root; - User cannot fully access to data even he's member of
vboxsf.
As workaround you have mount the shared folder passing the gid parameter to force the ownership to vboxsf.
sudo mount -o gid=<vboxsf gid> -t vboxsf <sf_name> <sf_mountpoint>
Change History (8)
by , 13 months ago
by , 13 months ago
| Attachment: | VBox.log.1 added |
|---|
by , 13 months ago
| Attachment: | VBox.log.2 added |
|---|
by , 13 months ago
| Attachment: | VBox.log.3 added |
|---|
comment:1 by , 13 months ago
| Description: | modified (diff) |
|---|
follow-up: 3 comment:2 by , 13 months ago
comment:3 by , 13 months ago
Replying to galitsyn:
Hi domp,
I presume the guest is running in
systemdenvironment. In this case you might need (likely) to reboot the guest in order to makeusermod -a -G vboxsf <user>to take effect.Regarding to file access modes, I do not see that we change it explicitly in driver unless it is specified with the
mount -ooption. Please compare access modes with the host side.
Hi galitsyn,
thanks for your answer. Yes, guests are running in systemd environment. Anyway I already added the user to vboxsf group and rebooted the machine several times from that moment.
The issue I observed is not related to the user membership, but the fact that the mount set, by default, the owner of the shared folder to root:root instead of root:vboxsf (like it was on 6.1.x releases).
Indeed if I mount the shared folder adding the explicit parameter -o gid=<vboxsf_gid>, I can access to data.
About the access modes, indeed, it could be caused by the host side, I'll update the ticket description to remove it from the scope.
comment:4 by , 13 months ago
| Description: | modified (diff) |
|---|


Hi domp,
I presume the guest is running in
systemdenvironment. In this case you might need (likely) to reboot the guest in order to makeusermod -a -G vboxsf <user>to take effect.Regarding to file access modes, I do not see that we change it explicitly in driver unless it is specified with the
mount -ooption. Please compare access modes with the host side.