samba-users August 2010 archive
Main Archive Page > Month Archives  > samba-users archives
samba-users: Re: [Samba] Can Samba lock files until copy is comp

Re: [Samba] Can Samba lock files until copy is complete?

From: Michael Wood <esiotrot_at_nospam>
Date: Sun Aug 22 2010 - 13:27:54 GMT
To: Whit Blauvelt <>

On 21 August 2010 15:12, Whit Blauvelt <> wrote:
> On Sat, Aug 21, 2010 at 02:17:08PM +0200, Michael Wood wrote:
>> If you can't control the filenames, try using something like incron to
>> process the files only when they have been closed. Or use lsof to
>> check if samba still has the files open. I don't know how reliable
>> that will be, but perhaps it's another heuristic to add to your "not
>> changed size for a while" check.
> incron? Don't know/can't find it.

It's the first link I get when googling for it. It's also available
in some Linux distributions. e.g. in recent versions of Ubuntu (8.04
or later), just apt-get install incron.

Here's the homepage:

> Good suggestion on lsof. If it turns out
> that Samba doesn't do anything strange like close a file at an intermediate
> state, then reopen and resume copying that might work perfectly.

Yes, I have no idea if it's possible for Samba to close the file in
the middle and then re-open it.

-- Michael Wood <> -- To unsubscribe from this list go to the following URL and read the instructions: