Hi,
Am 25.02.2011 16:39, schrieb Naganathan Rajesh:
We are using CURLOPT_POSTQUOTE option to rename a file after transfer of the
file using sftp protocol.But the POSTQUOTE option for rename is failing when
the sftp server is runing in Windows O/S.The same code works perfectly when the
sftp server is Linux or Sun OS.
Following is the Log from the server side.Is this is a open issue from
libcurl or an improper server implementation?
Complete FTP:
2011-02-23 14:46:31,203 INFO SFTPSubsystemServer [48:temp] Opened
/C-drive/.A20110223.0826+0000-XYZ.TBD.0000075BCD15.1 for writing
2011-02-23 14:46:31,844 ERROR SFTPSubsystemServer [48:temp] Failed to move file
.A20110223.0826+0000-XYZ.TBD.0000075BCD15.1 =>
A20110223.0826+0000-XYZ.TBD.0000075BCD15.1: The process cannot access the file
because it is being used by another process.
Cerebres SFTP :
2011/02/23 15:05:33 [5] File Open command received
2011/02/23 15:05:33 [5] File handle to
'//.A20110223.0931+0000-XYZ.TBD.0000075BCD15.1' opened
2011/02/23 15:05:33 [5] Upload started for file
'C:\.A20110223.0931+0000-XYZ.TBD.0000075BCD15.1'
2011/02/23 15:05:34 [5] Unable to rename file
'C:\.A20110223.0931+0000-XYZ.TBD.0000075BCD15.1'
2011/02/23 15:05:34 [5] Upload complete for file
'C:\.A20110223.0931+0000-XYZ.TBD.0000075BCD15.1'
2011/02/23 15:05:34 [5] Handle
'//.A20110223.0931+0000-XYZ.TBD.0000075BCD15.1' closed
FreeFTPD also shows a similar error that rename could not be done on a open
file.
Did someone face some issue like and there is a resolution for this?
I believe that this behaviour is a Windows OS feature [1], so unless the
file is closed after upload this will not work on Windows. Have you also
tried with FileZilla server?
Gün.
[1] http://msdn.microsoft.com/en-us/library/608h8bda%28v=vs.71%29.aspx
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html