NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

IanW's avatar
IanW
Tutor
Aug 07, 2015
Solved

Cannot overwrite file: "because the item is in use"

Hi there - have much frustration trying to overwrite file from our Macs (OSX 10.9.5) to ReadyNAS 4TB.   If we have project files stored locally on the Mac, and want to back them up to the ReadyNAS,...
  • carpii's avatar
    carpii
    Aug 11, 2015

    Mac has always been annoying when accessing AFP shares on a non-Mac server.

     

    There's a heap of hidden files it creates for each directory (a .DS_Store file, an .AppleDouble subdirectory, .Network_Trash etc).

    It also sometimes creates a hidden ._<filename> in the subdirectory

     

    I think its likely to be these associated metadata files which are locked, rather than the file itself (perhaps because someone else has recently opened the file directly from the NAS, or is viewing the subdir in FInder etc).

     

    You can disable the creation of .DS_Store files by runing this on each Mac..

     

    defaults write com.apple.desktopservices DSDontWriteNetworkStores true

     

    But I dont know of any way to disable creation of .AppleDouble

     

    Mac also has a tool called dot_clean...

    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/dot_clean.1.html

     

    This isnt ideal but it would be worth a try next time you get a locking issue, so you can confirm whether it is indeed the dotfiles causing the problem.

     

    Failing that, you might consider accessing the shares via SMB rather than AFP. 

    Latest OSX actually defaults to using SMB now, with AFP being used only for communicating between older Macs