VirtualBox shared folder is accessible but not workable

I experienced the same issue. My setup: VirtualBox 4.2.12 with Ubuntu 13.04 guest running on W7SP1 host, mounted Windows folder with fstab like this

dev /home/dregad/dev    vboxsf  auto,rw,uid=dregad,gid=dregad,umask=0022,dmode=0755,fmode=0644  0   0

I'm using Geany. Saving the file fails with similar symptoms as described in the question above for gedit (which fails too). Error message as follows:

Error saving file.
Error renaming temporary file: Text file busy
The file on disk may now be truncated!

My solution for Geany:

  • Edit / Preferences
  • Select Various tab
  • scroll down and check the box for use_atomic_file_saving
  • click OK

I don't use it much, so not sure if gedit provides a similar trick, but FWIW, you may want to have a look at this stackexchange question as it offers a workaround.