-1

I made this script to download a folder in a remote FTP with implicit SSL:

open -d ftps://USER:"PASS"@ftp.xxx.tld:990
mirror --verbose --continue /remote/folder $HOME/destination/folder;
bye

It connects, the features are:

<--- 220-Microsoft FTP Service
<--- 220 FTP SOMECOMPANY
---> FEAT
<--- 211-Extended features supported:
<---  LANG EN*
<---  UTF8
<---  AUTH TLS;TLS-C;SSL;TLS-P;
<---  PBSZ
<---  PROT C;P;
<---  CCC
<---  HOST
<---  SIZE
<---  MDTM
<---  REST STREAM
<--- 211 END

But when the mirror command tries to do its thing, it gets:

<--- 257 "/" is current directory.      
---> PBSZ 0
---- CWD path to be sent is `/remote/folder'
<--- 200 PBSZ command successful.
---> CWD remote
<--- 550 Access is denied. 
mirror: Access failed: 550 Access is denied.  (/remote/folder)
---> CWD folder
<--- 550 The system cannot find the file specified. 
---> QUIT

When I manually connect with lftp I do have ls access for example but cannot change directory, same error, 550.

On FileZila it works perfectly, I do have access to the folder and can download files. I'm puzzled here. Already tried cryptic things such as using:

lftp -e "set ftp:use-allo false; set ftp:passive-mode true; set ftp:prefer-epsv false;...

to no avail. Any tips? Thanks!

Gabriel
  • 5,453
  • 14
  • 63
  • 92

2 Answers2

1

You probably have to force TVFS here by using “set ftp:use-tvfs yes”. It enables Unix-like paths even if the server forgets to announce their support.

lav
  • 1,351
  • 9
  • 17
0

As the ftp server is hosted in a Windows envirionment, I had to use \ instead of / for defining paths.

Gabriel
  • 5,453
  • 14
  • 63
  • 92