[SATLUG] CIFS, ""text file busy", and copying anyway!

David Salisbury david.salisbury at momentumweb.com
Tue Dec 8 18:40:55 CST 2009

Howdy, all:

I've got a Windows share I've mounted via CIFS on my Linux box here.  In 
that shared directory is a file that is open and in-use by a process on 
the Windows machine.  I would like to copy that file, even though it is 
in use, from the share to the local Linux drive.  Problem is, when I try 
to copy it I get a "text file busy" error and it won't copy.  I've tried 
smbget, I've tried rsync, I've tried mounting the share with -o 
nooplock, -o noperm, -o directio, and none of these have allowed me to 
reach my goal of copying the file.

I figure there's gotta be a way to "force" it to just "copy anyway", 
right?  Does anyone know of a way?  At worst, I could schedule a task 
using robocopy or hobocopy on the Windows machine to make a copy of the 
file every hour or so, and just copy that across the share, but that 
doesn't seem very elegant (plus I'm not positive it will work, haven't 
tried yet but have read that (r/h)obocopy could possibly do it).  
Anyway, does anyone know of a way to force CIFS to allow that copy?  


More information about the SATLUG mailing list