Can't upload/save to file share, getting 'File in Use' error message.

Problem

While on the Mac, trying to save a file to the network share, you get an error message saying, 'File in Use', even though you do not have the file opened in any way.

Cause

This is a known bug with Mac OS X with Samba File shares with regards to Icon Preview enabled on both the source folder and the destination folder.  It appears that Mac OS X maybe not closing the file properly when it generates the Icon Preview.

Noted from Apple's Forums: Strange Problem when Copying files to NAS

This can also occur from the default finder window if you have your finder window open as gallery (has large preview as default view) or columns.

Solution

First switch finder in the top right menu bar to "list" so you do not have a preview by default, this may be enough to fix the issue.

It is recommended that on the properties of both the folder you are copying a file from and the folder you are copying to on the Mac to have 'Show Icons' unchecked.

The instructions on how to disable this is listed here: How to Disable Finder Icon Thumbnails and Previews for Images & Video Files