Reputation: 36
I'm using lftp 4.8.4 on Ubuntu 20.4 with my own ftpd server code.
As the debug log below shows, in preparation for a transfer lftp sends ALLO but appears to ignore the negative response (452 "no space").
I've also tried a 552 "Exceeded storage allocation" response, which was also ignored.
Is there a more appropriate response? Am I misunderstanding the role of ALLO?
Any and all suggestions welcome! Thanks.
> put lfs.img -o lfs3
---- Connecting to ftpd (192.168.0.171) port 21
<--- 220 nil
---> FEAT
<--- 211-Extensions supported:
<--- SIZE
<--- REST STREAM
<--- PASV
<--- 211 END
---> USER anonymous
<--- 331 nil
---> PASS lftp@
<--- 230 nil
---> PWD
<--- 257 /
---> TYPE I
<--- 200 nil
---> PASV
<--- 227 Entering Passive Mode. 192,168,0,171,255,249
---- Connecting data socket to (192.168.0.171) port 65529
---- Data connection established
---> ALLO 72408
<--- 452 no space
---> STOR lfs3
<--- 500 open fail
---- Closing data socket
put: lfs.img: Fatal error: 500 open fail
Upvotes: 0
Views: 243
Reputation: 36
lftp correctly handles a response of 552 ("Requested file action aborted. Exceeded storage allocation") to an ALLO command. lftp responds to the 552 response with a STOR command, immediately followed by an ABOR (ie. Abort) command.
From RFC 959 (para 4.1.3.): "This command [ALLO] shall be followed by a STORe or APPEnd command." So although the STOR command will not succeed, it would be incorrect to skip it and just send ABOR.
Upvotes: 1