Can't modify files in my shared folder (virtualbox, guest is Ubuntu, host is windows 7)

I'm using virtual-box. The guest is Ubuntu. The host is Windows 7. I have a shared folder (shared by the host and the guest).

The problem is that in the guest (Ubuntu) I cannot rename/delete/edit the files in the shared folder. For instance, after I edit the file and try to save it I get the following error message:

Could not save the file fileName. Unexpected error: Error renaming temporary file: text file busy

In the host (Windows) I can rename/edit/delete without any problem. What can I do?


Solution 1:

You may suffer from bug #34813, where access to shares on Windows systems is broken. Access to files on Ubuntu hosts is not affected.

Troubleshoot Shared Folders in Virtual Box

To investigate if your shared folders are setup correctly you may go through the following steps:

  • Install the latest release of Virtual Box.

  • Make sure Guest Additions meet your VBox release.

  • Not define shared folders as read-only if you need write access.

  • Guest users need to be in the group vboxsf for auto-mounted shares.

  • Mount temporary shares with option rw and appropriate uid for write access,

    (e.g. sudo mount -t vboxsf -o uid=1000 sharename mountpoint)

Solution 2:

How did you mount that shared folder?

I had the same problem but with power of fstab I finally manage to freely access my shared folder - just have added the line:

//shareIP/sharedFolder mountpoint smbfs rw,umask=777,uid=linuxUID,username=winUsername,password=winPassword,auto 0 0

Now you can reboot your OS or just do sudo mount <mountpoint>.

Somehow with "native" vbox sharing I could not achieve this - not even access shared folder although it was visible.