[Samba] Moving file after transfer

Sven Tegethoff tegethoff at udobaer.de
Thu Nov 22 05:18:08 MST 2012


On 21.11.2012 17:07, Ovidiu Barzan wrote:
> Is there a better way then the close call to know when a client is done with the file, and it's safe to move it?
>
If you have any influence on the client-side process that generates the 
file, the easiest and safest way would be to write the file with a 
temporary filename (let's say with a ".tmp" suffix), and let the client 
rename the file to its final name only after it is "done" with it. Let 
your VFS module ignore temporary files, and you should be safe.

(This also works nicely for FTP uploads where some server-side process 
needs to know when an upload is complete.)

-- 

Mit freundlichen Grüßen

Sven Tegethoff
EDV-Team

_________________________________________________________
UDO BÄR GmbH & Co. KG	
Fürstenstraße 18
47051 Duisburg
Tel.: +49 (0) 203 28117-142
Fax: +49 (0) 203 28117-151
E-Mail: tegethoff at udobaer.de

Ust.-Idnr.: DE119562189, HRA 6056, Sitz der Gesellschaft: Duisburg,
Gerichtsstand: Duisburg Geschäftsführer: Bodo Badnowitz, Jürgen Dietz

Ein Unternehmen der BTI Gruppe: www.bti-group.com

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.  This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail.  Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



More information about the samba mailing list