View previous topic :: View next topic |
Author |
Message |
cloc3 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/39525275142a0fd302dc7e.gif)
Joined: 13 Jan 2004 Posts: 4815 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Mon Feb 10, 2025 12:56 am Post subject: [lftp] comportamento anomalo |
|
|
mi capita una strana cosa con lftp.
trasferendo alcuni file da locale, si verificano fenomeni di corruzione.
nell'esempio sottostante, il file pdf pippo.pdf viene trasferito in remoto e apparentemente funzione tutto bene.
infatti il log dichiara 974696 bytes transferred
quando però controllo il file system remoto con ls, la lunghezza del file risulta alterata: ... 262144 Feb 10 00:45 pippo.pdf
a questo punto, qualunque upload del file, (via lftp o via GET) scarica un documento corrotto, inutilizzabile per qualunque lettore.
il fenomeno non riguarda tutti i file. per esempio i file di testo si trasferiscono bene.
inoltre, usando filezilla, il trasferimento è corretto.
cosa posso fare?
Code: |
cloc3@cloc3 ~/pippo $ !lftp
lftp cloc3.net
lftp 2533398@aruba.it@ftp.cloc3.net:~> cd www.cloc3.net/varie
cd ok, cwd=/www.cloc3.net/varie
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> !ls -l pippo.pdf
-rw-r--r-- 1 cloc3 cloc3 974696 10 feb 01.45 pippo.pdf
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> put pippo.pdf
974696 bytes transferred
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> ls -l pippo.pdf
-rwxr-xr-x 1 188531235 188531235 262144 Feb 10 00:45 pippo.pdf
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> get pippo.pdf
262144 bytes transferred
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> !ls pippo.pdf -l
-rw-r--r-- 1 cloc3 cloc3 262144 10 feb 01.45 pippo.pdf
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie>
|
_________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sabayonino Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/20209838565fb448891ad70.gif)
Joined: 03 Jan 2012 Posts: 1050
|
Posted: Mon Feb 10, 2025 10:17 pm Post subject: |
|
|
Ciao.
prova il trasferimento in ASCII mode
_________________ LRS 64/32 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cloc3 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/39525275142a0fd302dc7e.gif)
Joined: 13 Jan 2004 Posts: 4815 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Wed Feb 12, 2025 10:28 am Post subject: |
|
|
sabayonino wrote: | Ciao.
prova il trasferimento in ASCII mode
|
Code: |
cloc3@cloc3 ~ $ lftp -a cloc3.net
lftp: opzione non valida -- "a"
|
non è un'opzione prevista nel manuale.
probabilmente ti riferisci a qualche opzione del comando set.
mi aiuteresti, pescando nel link che ho indicato sopra (non trovo nessun riferimento al termine asciii)? _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sabayonino Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/20209838565fb448891ad70.gif)
Joined: 03 Jan 2012 Posts: 1050
|
Posted: Wed Feb 12, 2025 1:37 pm Post subject: |
|
|
si scusa , fa parte del sottocomando get
Code: | get [-E] [-a] [-c] [-e] [-P N] [-O base] rfile [-o lfile] ...
Retrieve the remote file rfile and store it as the local file lfile. If -o is omitted, the file is stored to local file named as base name of rfile. You can get
multiple files by specifying multiple instances of rfile (and -o lfile). Does not expand wildcards, use mget for that.
-c continue, reget
-E delete source files after successful transfer
-e delete target file before the transfer
-a use ascii mode (binary is the default)
|
_________________ LRS 64/32 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cloc3 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/39525275142a0fd302dc7e.gif)
Joined: 13 Jan 2004 Posts: 4815 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Thu Feb 13, 2025 8:42 am Post subject: |
|
|
sabayonino wrote: | si scusa , fa parte del sottocomando get
|
questa volta intendevi put:
Code: |
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> put -a pippo.pdf
21304 bytes transferred
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> ls pippo.pdf
-rwxr-xr-x 1 188531235 188531235 0 Feb 13 08:38 pippo.pdf
|
purtroppo non funziona ancora.
anche questa volta, il log sembra corretto, ma la dimensione del file trasferito no. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cloc3 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/39525275142a0fd302dc7e.gif)
Joined: 13 Jan 2004 Posts: 4815 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Thu Feb 13, 2025 5:27 pm Post subject: |
|
|
sembra che venga trasferito un file di 14434 byte, ma non uno di 14436:
Code: |
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> put A.txt
14434 bytes transferred
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> ls A.txt
-rwxr-xr-x 1 188531235 188531235 14434 Feb 13 17:23 A.txt
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> put A.txt
14436 bytes transferred
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> ls A.txt
-rwxr-xr-x 1 188531235 188531235 0 Feb 13 17:23 A.txt
|
_________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sabayonino Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/20209838565fb448891ad70.gif)
Joined: 03 Jan 2012 Posts: 1050
|
Posted: Fri Feb 14, 2025 7:52 pm Post subject: |
|
|
ho trovato questa discussione sul git per lftp che sembra rispecchiare il caso tuo
https://github.com/lavv17/lftp/issues/606
se ti riconosci in questa casistica , il motivo sembra essere la crittazione/decrittazione durante il trasferimento (ssl ? )
Hai verificato che il file del ricevente non sia corrotto ? _________________ LRS 64/32 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
cloc3 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/39525275142a0fd302dc7e.gif)
Joined: 13 Jan 2004 Posts: 4815 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Sat Feb 15, 2025 9:45 am Post subject: |
|
|
grazie ancora.
sto usando il server ftp con una connessione al server sftp:, ma ho provato anche ad usare ftp: con gli stessi risultati. è probabile che la comunicazione criptografata sia comunque imposta di default a mia insaputa. questo è il mio rc di default:
Code: |
cloc3@cloc3 ~/prova/pippo $ cat ~/.lftp/rc
set ssl:verify-certificate no
set xfer:clobber yes
|
il file con cui sto facendo i test adesso (A.txt è un file di testo di 14436, prefettamente integro che sembrerebbe il limite minimo a cui compare il malfunzionamento.
il comando implicato è un put, mentre quello della discussione che mi hai segnalato è un mirror. senza attributi, il comando mirror lavora in get. inoltre, io non ricevo il messaggio di errore mget: FILE1.csv: file size decreased during transfer.
dalla discussione, ho imparato i comandi set sftp:max-packets-in-flight 1; e debug 10.
posto i risultati, che tuttavia non mi danno nuove idee:
Code: |
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> set sftp:max-packets-in-flight 1;
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> debug 10
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> put A.txt
copy-peer: EOF on FD 5
copy: get hit eof
copy: waiting for put confirmation
---> TYPE I
<--- 200 Type set to: Binary.
---> PASV
<--- 227 Entering passive mode (89,46,104,218,201,117).
---- Connessione del socket dei dati a (89.46.104.218) porta 51573
---- Data connection established
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
---> STOR A.txt
<--- 125 Data connection already open. Transfer starting.
WARNING: Certificate verification: subjectAltName does not match ‘ftp.cloc3.net’ (BD:C5:E8:0F:21:E2:82:C3:DA:04:31:8D:C2:0B:34:68:9F:8E:8E:35)
---- Chiusura del socket dati
<--- 226 Transfer complete.
---> MFMT 20250213172346 A.txt
<--- 213 Modify=20250213172346; /www.cloc3.net/varie/A.txt.
copy: put confirmed store
copy: get is finished - all done
14436 bytes transferred
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> ls A.txt
---> TYPE A
<--- 200 Type set to: ASCII.
---> PASV
<--- 227 Entering passive mode (89,46,104,218,201,95).
---- Connessione del socket dei dati a (89.46.104.218) porta 51551
---- Data connection established
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
---> LIST A.txt
<--- 150 File status okay. About to open data connection.
WARNING: Certificate verification: subjectAltName does not match ‘ftp.cloc3.net’ (BD:C5:E8:0F:21:E2:82:C3:DA:04:31:8D:C2:0B:34:68:9F:8E:8E:35)
<--- 226 Transfer complete.
---- Got EOF on data connection
---- Chiusura del socket dati
-rwxr-xr-x 1 188531235 188531235 0 Feb 13 17:23 A.txt
copy: get hit eof
copy: waiting for put confirmation
copy: put confirmed store
copy: get is finished - all done
|
aggiungo per confronto un trasferimento coretto, con un file A.txt di 14434 bytes.
Code: |
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> set sftp:max-packets-in-flight 1;
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> debug 10
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> put A.txt
copy-peer: EOF on FD 5
copy: get hit eof
copy: waiting for put confirmation
---> TYPE I
<--- 200 Type set to: Binary.
---> PASV
<--- 227 Entering passive mode (89,46,104,211,200,118).
---- Connessione del socket dei dati a (89.46.104.211) porta 51318
---- Data connection established
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
---> STOR A.txt
<--- 150 File status okay. About to open data connection.
WARNING: Certificate verification: subjectAltName does not match ‘ftp.cloc3.net’ (BD:C5:E8:0F:21:E2:82:C3:DA:04:31:8D:C2:0B:34:68:9F:8E:8E:35)
---- Chiusura del socket dati
<--- 226 Transfer complete.
---> MFMT 20250215093952 A.txt
<--- 213 Modify=20250215093952; /www.cloc3.net/varie/A.txt.
copy: put confirmed store
copy: get is finished - all done
14434 bytes transferred
lftp 2533398@aruba.it@ftp.cloc3.net:/www.cloc3.net/varie> ls A.txt
---> TYPE A
<--- 200 Type set to: ASCII.
---> PASV
<--- 227 Entering passive mode (89,46,104,211,200,236).
---- Connessione del socket dei dati a (89.46.104.211) porta 51436
---- Data connection established
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
---> LIST A.txt
<--- 150 File status okay. About to open data connection.
WARNING: Certificate verification: subjectAltName does not match ‘ftp.cloc3.net’ (BD:C5:E8:0F:21:E2:82:C3:DA:04:31:8D:C2:0B:34:68:9F:8E:8E:35)
---- Got EOF on data connection
---- Chiusura del socket dati
<--- 226 Transfer complete.
-rwxr-xr-x 1 188531235 188531235 14434 Feb 15 09:39 A.txt
copy: get hit eof
copy: waiting for put confirmation
copy: put confirmed store
copy: get is finished - all done
|
il fatto che il trasferimento risulti corretto con filezilla mi ha convinto che il difetto riguardi il programma lftp, quindi ho provato ad aprire un baco anche lì. al momento non ho ricevuto risposte. rimango in attesa. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|