Samba share of vboxsf share

Discussions about using Linux guests in VirtualBox.
Post Reply
Orionn
Posts: 3
Joined: 30. Mar 2021, 10:33

Samba share of vboxsf share

Post by Orionn »

Short version: I am having trouble setting up a new server and having a samba share on a Virtualbox shared folder.
Long version: I have a Windows 10 host with an external NTFS hard drive. I'm using vboxsf to share that whole drive to an Ubuntu host. On my old vm (Ubuntu Server 19.04, using Samba 4.10.0), I am able to have a public SMB share on the Linux guest that works normally - can read/write/delete/modify files and folders. When I try to upgrade (as Ubuntu 19.04 is EOL), any update of Samba (just going to Ubuntu 19.10 with Samba 4.10.7) means that the share still works, but the folders can't be deleted over the network (can still be deleted on CLI, and on Windows host).

I'm assuming this is due to a permissions issue on the vboxsf share. I'm tried mapping the smb.conf to the admin/nobody/guest user, but it doesn't fix it.

I don't think this is a samba issue, as when I make the same share on a folder in the home directory it works fine. Both directories have exactly the same permissions (777, same owner/group), as confirmed by ls -l.

Anyone got any ideas?

Note: I know "sharing a share" isn't ideal and I should share the folder from the windows host, but the idea is portability. If the windows host dies, I can relatively easily move the VM to another machine with the data/drives/backups and not have to re-setup all the samba users, restrictions, etc.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Samba share of vboxsf share

Post by mpack »

VirtualBox shared folders are not network shares. I don't know of any useful way to share them on a network.

And it isn't just "not ideal" to share a share. Shared folders are not actual storage, they are just a piece of software that you communicate with using a specialized browser. There are lots of things that make no sense on shared folders, such as formatting, disk checking, and sharing.

Permissions don't really apply either. A file's actual permission is whatever the owner says it is, not what some remote browser says it is. Some OS's do admittedly let you change file permissions remotely sometimes, but only in scenarios where big assumptions are made, such as the PC at both ends running compatible versions of Windows. This scenario does not allow, say, storing Linux EXTx permissions in a physical Windows NTFS filesystem.
Orionn
Posts: 3
Joined: 30. Mar 2021, 10:33

Re: Samba share of vboxsf share

Post by Orionn »

Note: It's only the folders themselves that can't be deleted over SMB. I can delete files within the folders fine. It doesn't appear to have anything to do with who created the folder, either.
I did a fresh install using Ubuntu server 20.04LTS, and saw the same issue.

Any ideas on what could be causing this issue? I've tried uid/gid/mask options in fstab, I've tried changing force user on the smb.conf, numerous variations on smb.conf, deleting my samba credentials on windows.
Orionn
Posts: 3
Joined: 30. Mar 2021, 10:33

Re: Samba share of vboxsf share

Post by Orionn »

Something going from samba 4.10.0 to 4.10.7 killed the ability to share a folder using a vboxsf share.
I have rolled back to 18.04LTS, which works fine and should give me security updates for another 2 years. After that, I'll get an AI to migrate everything to a space computer for me.
Post Reply