![]() |
FTPS example - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: FTPS example (/showthread.php?tid=1002) Pages:
1
2
|
FTPS example - npinguin - 19.09.2017 Hello I am trying to secure ftp a backup file to a nas Does anyone have an example? I use currently the folowing code wich fails with error : * string: 504 TLS/SSL protection required. Code: -- ftp to NAS Thanks Nicky RE: Sftp example - Erwin van der Zwart - 19.09.2017 Hi, Try this: Code: require('socket.ftp') BR, Erwin RE: Sftp example - npinguin - 20.09.2017 Thank Erwin But that looks to be a regular FTP, i need sftp? Thanks Nicky RE: Sftp example - admin - 21.09.2017 Which LM version do you have? RE: Sftp example - npinguin - 21.09.2017 (21.09.2017, 14:24)admin Wrote: Which LM version do you have?Reactor v2 running latest firmware RE: Sftp example - admin - 22.09.2017 Update this package through system config > packages: https://dl.openrb.com/lm-17/pkg/luasocket_2.0.2-20_mxs.ipk Then add secure = true to your ftp.put config table. If you get an error that data connection must be encrypted try adding datasecure = true as well. This might not work for all FTP servers and it depends on how the server is configured. RE: Sftp example - npinguin - 22.09.2017 Thanks Admin Close but not yet there I updated the package and added the option secure = true on the synology nas: empty file is created on the logic machine I have an error:"closed" I added the option secure = true and datasecure = true on the synology nas: no file is created on the logic machine I have an error:"503 Use AUTH and PBSZ commands first" RE: FTPS example - admin - 22.09.2017 Ok, can you enable remote diagnostics on your LM and forward port 22, then send me access via PM? RE: FTPS example - admin - 25.09.2017 Thanks for access providing, please install updated package and try again: https://dl.openrb.com/lm-17/pkg/luasocket_2.0.2-21_mxs.ipk RE: FTPS example - npinguin - 25.09.2017 (25.09.2017, 11:29)admin Wrote: Thanks for access providing, please install updated package and try again: Thanks a lot, Works perfectly ! Are you going to include this in future firmwares, or will it be a seperate install? Nicky RE: FTPS example - admin - 26.09.2017 Yes, it will be included in the future fw releases. RE: FTPS example - DGrandes - 22.02.2023 Hi! Is there any update about this? Can I use sftp in Logic Machine to make a backup in a NAS? Those links are broken Thanks RE: FTPS example - admin - 23.02.2023 Updated packages are already included in the latest firmware. No need to install anything manually. SFTP (file transfer over SSH) is not supported yet. This topic is about FTPS which is a secure version of the FTP protocol. Your NAS should support it. RE: FTPS example - Kilogica - 13.03.2024 I would like to point out that the script is used in many web servers, both Schneider and LM, and has always worked and still works every day. when I try to upload the backup to ftp, the upload happens, but the backup has size 0 and if I try to open it it gives me an error. Furthermore, it is logged in the error log os.remove call blocked. What is going on? Code: require('socket.ftp') RE: FTPS example - Daniel - 13.03.2024 Which firmware do you use? RE: FTPS example - admin - 13.03.2024 Erwin's code is outdated. This script should be used instead: https://kb.logicmachine.net/scripting/backup-file-email-ftp/ RE: FTPS example - Kilogica - 13.03.2024 now it gives me io.readproc call blocked os.tmpname call blocked the problem is on a wiser with firmware 3.0.0 the file si uploaded with dimension zero kylobyte Code: host = 'ip' RE: FTPS example - Daniel - 13.03.2024 Block unsafe functions in scripts: make sure this is disabled RE: FTPS example - Kilogica - 13.03.2024 (13.03.2024, 11:29)Daniel Wrote: Block unsafe functions in scripts: make sure this is disabled Thanks, the problem partially solved, file loaded but corrupt RE: FTPS example - Daniel - 13.03.2024 I just tried it on SL 3.0.0 and it works just fine. Use 7zip for editing. |