When I searched for others encountering this same issue, the reason always seemed to be related to large file support. In my case I am using Curl to FTP upload a 8.8Mb file and consistently get the unaligned file error at about 85% of the file transferred. The transfer time is roughly 5 minutes. I am using the package install rel. 7.10.3 on Solaris 2.8 sending curl -v -p -x $proxy:$pport -u $user:$pass -T $file ftp://$server/$path/$file It sounds as if the transfer is being aborted by something along the way. It could be a bad network, bad proxy, bad server or a curl bug. Does it always die after the same amount of time?
From: Leon Vanderploeg Date: Tue, 31 Oct 2006 15:50:54 -0700. Greetings, I am new to cURL, and am trying to make it work. I have been able to get to a successful connection, but the file is always 0 bytes (result 18). May 29, 2017 - Do you have permission to access that directory? Have you tried logging into FTP server with a standard FTP client and then switch to that directory?
I'm not familiar with any bug in curl that would produce this problem, but then you're using a fairly old version. The real issue has been discovered. The system that the file was being sent to was moving the file while it was being sent.
It checked for the file every 5 min. And relocated it. My process kept retrying the transfer every 10 minutes. Now I immediately retry a failed transfer and, if needed, recycle attempts every 7 min.
Thanks -Dan Palasek -Original Message- From: [email protected] mailto:[email protected] Behalf Of Daniel Stenberg Sent: Wednesday, July 14, 2004 8:39 AM To: curl tool talk Subject: Re: Uploaded unaligned file size error. Original Message- Sent: Friday, July 16, 2004 08:34 Subject: RE: Uploaded unaligned file size error The real issue has been discovered. The system that the file was being sent to was moving the file while it was being sent.
It checked for the file every 5 min. And relocated it. My process kept retrying the transfer every 10 minutes.
Now I immediately retry a failed transfer and, if needed, recycle attempts every 7 min. Thanks -Dan Palasek -Original Message- Sent: Wednesday, July 14, 2004 8:39 AM To: curl tool talk Subject: Re: Uploaded unaligned file size error. Curl -v -p -x $proxy:$pport -u $user:$pass -T $file ftp://$server/$path/$file It sounds as if the transfer is being aborted by something along the way. It could be a bad network, bad proxy, bad server or a curl bug. Does it always die after the same amount of time?
I'm not familiar with any bug in curl that would produce this problem, but then you're using a fairly old version. Daniel Stenberg - - Dedicated custom curl help for hire: - ATTENTION: The information in this electronic mail message is private and confidential, and only intended for the addressee. Should you receive this message by mistake, you are hereby notified that any disclosure, reproduction, distribution or use of this message is strictly prohibited. Please inform the sender by reply transmission and delete the message without copying or opening it. Messages and attachments are scanned for all viruses known. If this message contains password-protected attachments, the files have NOT been scanned for viruses by the ING mail domain.
Always scan attachments before opening them. This method was also under consideration and may be implemented with a later code revision.
Changing job timings is simpler to get through change control quickly.Dan Palasek -Original Message- From: [email protected] mailto:[email protected] Behalf [email protected] Sent: Friday, July 16, 2004 12:29 AM To: [email protected] Subject: RE: Uploaded unaligned file size error There is a better way., Try to upload to a temporary name, and rename to the intended name, in that case it can't fail. Kind regards, Nico Baggus ING Securities Services Systems Management +31 20 - 7979577.
Original Message- Sent: Friday, July 16, 2004 08:34 Subject: RE: Uploaded unaligned file size error The real issue has been discovered. The system that the file was being sent to was moving the file while it was being sent.
It checked for the file every 5 min. And relocated it. My process kept retrying the transfer every 10 minutes. Now I immediately retry a failed transfer and, if needed, recycle attempts every 7 min. Thanks -Dan Palasek -Original Message- Sent: Wednesday, July 14, 2004 8:39 AM To: curl tool talk Subject: Re: Uploaded unaligned file size error.
Curl -v -p -x $proxy:$pport -u $user:$pass -T $file ftp://$server/$path/$file It sounds as if the transfer is being aborted by something along the way. It could be a bad network, bad proxy, bad server or a curl bug. Does it always die after the same amount of time? I'm not familiar with any bug in curl that would produce this problem, but then you're using a fairly old version. Daniel Stenberg - - Dedicated custom curl help for hire: - ATTENTION: The information in this electronic mail message is private and confidential, and only intended for the addressee.
Should you receive this message by mistake, you are hereby notified that any disclosure, reproduction, distribution or use of this message is strictly prohibited. Please inform the sender by reply transmission and delete the message without copying or opening it. Messages and attachments are scanned for all viruses known. If this message contains password-protected attachments, the files have NOT been scanned for viruses by the ING mail domain. Always scan attachments before opening them.
Hi there, I have tried to upload a zip file with the following command and always received a 'Uploaded unaligned file size' error and the zip file is just partially uploaded to ther server curl -v -u user:password -upload-file myfile.zip ftp://myftpserver I tried to use the same option to upload a binary file (e.g. Wordpad.exe) or a text file, it all worked fine. The Curl I am using was download from the link 'VMS Alpha 7.13.0 binary Marty Kuhrt 1777 KB ' and I am using OpenVMS here.
I also tested the windows version of Curl and the zip file can be uploaded without any problems. By the way, if I add the -crlf option, the zip file then can be uploaded without the error, but the file size is increased by a coulpe of bytes and I can't use winzip to open it as it said the file is not in the right format. Any ideas why this would happen?
Logged In: NO Well, the problem is that Curl for VMS version does not have a same behavior as Curl for windows or any other ftp client software in terms of uploading the files, which has LF character insides (not necessary a binary file or ascii file). You can easily repeat this issue if you try it on a VMS machine. Also I am not complaining the -crtl option, on the contrary, I am saying this is the only way that we can play around with the problem. If you read the source code, you can see that with the -crtl option, curl explicitly read the file byte by byte to do the translation if needed, and then put them into a new buffer to send.
While, without -crtl option, it just reads the file block by block to the buffer and somehow it can be partialy sent if there is a LF. Logged In: YES userid=663072 Send me an email at [email protected] and we can work on this problem. Make sure to put VMS somewhere in the subject line so I know it is not just a generic curl announcement message. CURL on VMS shouldn't be any different than any other OS, since I don't think there have been any changes to the code path that are VMS specific (at least nothing I've worked on, anyway). Zip files on VMS should be fixed length 512 byte record files, which is the same for any executable, so if executables transfer OK it is odd that zip files don't. What IP stack are you using on VMS, and what ftp server are you connecting to do the upload?
![Curl 18 Uploaded Unaligned File Size Curl 18 Uploaded Unaligned File Size](http://ekhidna2.biocenter.helsinki.fi/sans/fig5.png)
Most Windows boxes I've worked with have ftp clients, but not ftp servers, so if you are uploading to a Windows box the ftp server you are using might be important. ZIP files should be binary files and are routinely transferred by FTP that way. Transferring a ZIP as an ASCII file will corrupt them. I need to do some tests with ZIP files, but I suspect this is similar to, in this case the ZIP file format is not set to STREAMLF for some reason so that an incorrect upload size is calculated. The protocol for FTP STRU support of VMS attributes appears to be implemented in the open source CKERMIT and the MAD GOAT FTP product, and the HG FTP product which is the successor to HG FTP. In that case the FTP client detects that the server is VMS and transfers the VMS files always as a binary file, but then sets the VMS specific record attributes so that the file structure on the server matches the client.
The fix for the original bug has been checked in to curl and should appear in curl 7.32. Curl will now convert and upload in the two variable length text file types that are produced by DCL and text editors as STREAMLF files. Curl will also convert and upload STREAMCR files as STREAMLF files.
This conversion is done by the OpenVMS C runtime. Curl will now upload all other file types as STREAMLF files which respects the logical EOF in the final block. FTP STRU support of VMS will need to be tackled as a separate issue.