wget doesn't find a existing file (ftp)

2

0

I have proftpd on my server. I'm not totally sure its config is perfect, but something I can't understand :

$ LC_ALL=en ls -l useradd.LDAP.tar.gz
ls: cannot access 'useradd.LDAP.tar.gz': No such file or directory
$ lftp myserver
lftp myserver:~> get useradd.LDAP.tar.gz
1682 octets transférés
lftp myserver:~> pwd
ftp://myserver
lftp myserver:/> exit
$ LC_ALL=en ls -l useradd.LDAP.tar.gz
-rw-r--r-- 1 chris users 1682 Dec 17  2004 useradd.LDAP.tar.gz
$ LC_ALL=en wget ftp://myserver/useradd.LDAP.tar.gz
--2018-07-26 00:09:07--  ftp://myserver/useradd.LDAP.tar.gz
        => 'useradd.LDAP.tar.gz.1'
Resolving myserver... 192.168.0.102
Connecting to myserver|192.168.0.102|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD not needed.
==> SIZE useradd.LDAP.tar.gz ... done.

==> PASV ... done.    ==> RETR useradd.LDAP.tar.gz ... 
No such file 'useradd.LDAP.tar.gz'.

Why wget can't download it ? No message about it in /var/log/proftpd/{proftpd.log,xfer.log}

Chris

Posted 2018-07-26T04:18:06.090

Reputation: 21

You could debug with wireshark to see how the messages exchanged between client and ftp server differ for lftp and wget. Possibly it starts with a different working dir after logging in? – dirkt – 2018-07-26T05:18:12.310

2Do a pwd when in lftp, to check the current remote directory. There could also be access flags on the remote file (or its parent directory) that prevent access by the transfer service (httpd, proftpd...) or the userid it assumes when you connect. – xenoid – 2018-07-26T06:29:06.073

@xenoid : ~> pwd
ftp://myserver
– Chris – 2018-07-26T19:53:25.040

@dirkt wireshark will be complicated for me. About possible different working dir, I don't understand why. It works when I don't use VirtualHost, but not in anonymous mode in a VirtualHost. – Chris – 2018-07-26T19:58:32.627

No answers