Bug 245865

Summary: emulators/virtualbox-ose-additions doesn't let go of files placed on a Windows host shared folder
Product: Ports & Packages Reporter: nixuser <ilaurie>
Component: Individual Port(s)Assignee: vbox (Nobody) <vbox>
Status: New ---    
Severity: Affects Many People CC: groenveld
Priority: --- Flags: bugzilla: maintainer-feedback? (vbox)
Version: Latest   
Hardware: amd64   
OS: Any   

Description nixuser 2020-04-24 03:52:56 UTC
virtualbox-ose-additions doesn't seem to want to let go of files placed on a Windows host shared folder.  

My host is Win8.1, VirtualBox is 6.1.6, my FreeBSD is 12.1-RELEASE-p3 and my GUI in FreeBSD is Xfce 4.14.

Not sure if this is an issue with FreeBSD or Linux hosts.

Minimal steps to highlight issue:

1. Mount Windows shared folder, for example: sudo mount -t vboxvfs -w Development ~/host
2. Go there in the file manager.
3. Right click "Create Document" -> "Empty File".
4. Then try to delete it.  It cannot be deleted.

If you try to delete the file from the command line:

$ rm dog
rm: dog: Text file busy

In fact it cannot be deleted even on the Windows host until the VM shuts down, it's as if the file is still open for writing or something.

This issue came to light running some code that creates lock files, but when done the code was unable to delete the lock files, leaving things in a locked state.  Needless to say this is rather annoying.

Derived distros like FuryBSD exhibit the same problem.