This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

FTPS trouble with ftp.put
#1
Dear all,
on the advice of the Italian distributor I open this new thread on a topic already partially covered.

I have two LM5 Lite (fw 20240219) on my desktop connected to the same switch, on the first LM I run the client code (scripting/scheduled) you see below and I use the second as an FTP server.

With the FTP server without encryption mode, I remove the two parameters secure = true and datasecure = true from the client code and I can transfer a 2 MB .csv file without problems from the first LM to the other.

If I enable Require Encryption FTPS mode on the server and re-enable the two parameters secure/datasecure on the first LM, I can only transfer small size file (< 8 KB) otherwise I receive a 426 Failure reading network stream error and the file is truncated on the server.

If I use a generic FTPS client like Filezilla or WinSCP I can transfer files of any size on the second LM without error.

Over the weekend I tried to understand more but all I got was a headache...

Code:
ftp = require('socket.ftp')
ltn12 = require('ltn12')
host = 'xxx.xxx.xxx.xxx'
user = 'xxx'
pass = 'xxx'
data = io.readfile('/data/ftp/testfile.txt') 
path = ('/testfile.txt')
res, err = ftp.put({
  host = host,
  user = user,
  password = pass,
  argument = path,
  type = "a",
  secure = true, -- Remove with FTP Server without encryption
  datasecure = true, -- Remove with FTP Server without encryption
  source = ltn12.source.string(data)
})
 
if not res then
  alert('FTP upload error: %s', tostring(err))
end
Reply


Messages In This Thread
FTPS trouble with ftp.put - by ferrim - 24.03.2024, 17:29
RE: FTPS trouble with ftp.put - by admin - 25.03.2024, 10:57
RE: FTPS trouble with ftp.put - by ferrim - 25.03.2024, 12:40

Forum Jump: