"File In Use" error on Windows VirtualBox

1.3k Views Asked by At

Using Vagrant on a Windows Virtualbox, I'm receiving the error "File in Use" whenever I try to delete an asset from a shared folder on the Host OS or change its filename. This occurs after I load a file/asset through Nginx.

Windows Error

File In Use The action can't be completed because the file is open in VBoxHeadless Close the file and try again.

Also moving/deleting the file within the Guest OS fails:

$ mv test.css test2.css
mv: cannot move `test.css' to `tests2.css': Text file busy
$ rm test.css
rm: cannot remove `test.css': Text file busy
1

There are 1 best solutions below

2
Ricky Boyce On

Just leaving this here for any future readers. I found that the Nginx configurations open_file_cache & sendfile were the culprits, and after turning these off during development, removed the error.

Nginx.conf

open_file_cache off;
sendfile off;