Discussion:
LFTP does not quit when receiving 530 Permission Denied response
Jeremy Matthews
2014-03-11 14:06:32 UTC
Permalink
Hi,

I am using lftp in a script. It is an older 4.0.9 version which was installed in an older Fedora version. When the user root is passed to lftp and lftp tries to connect to the FTP server, the FTP server responds with a 530 Permission Denied. This is not surprising as root is not normally permitted with FTP. However, lftp does not quit and tries the connection again in 30 seconds. This is an issue, because I would like lftp to quit and return an error code. It seems to run indefinitely. In contrast, when using a different user but with an incorrect password and the FTP server responds with a 530 Login Incorrect, lftp will stop.

I have tried doing a 'set net:max-retries 1' which works in stopping lftp after the 530 Permission Denied failure. However, lftp returns a successful error code, 0.

Has this been a known issue? Is there a way to stop lftp and return an error code within the 4.0.9 version?

Thanks in advance for any input.

Jeremy Matthews
Alexander V. Lukyanov
2014-03-13 08:14:12 UTC
Permalink
Post by Jeremy Matthews
I am using lftp in a script. It is an older 4.0.9 version which was installed in an older Fedora version. When the user root is passed to lftp and lftp tries to connect to the FTP server, the FTP server responds with a 530 Permission Denied. This is not surprising as root is not normally permitted with FTP. However, lftp does not quit and tries the connection again in 30 seconds. This is an issue, because I would like lftp to quit and return an error code. It seems to run indefinitely. In contrast, when using a different user but with an incorrect password and the FTP server responds with a 530 Login Incorrect, lftp will stop.
Please check the setting "ftp:retry-530".

--
Alexander.

Loading...