Results 1 to 7 of 7

Thread: lftp or other methods to connect to ftps://

  1. #1
    Join Date
    Apr 2009
    Beans
    264
    Distro
    Ubuntu 12.04 Precise Pangolin

    lftp or other methods to connect to ftps://

    I recently made a script to automatically download a directory from my webserver using ftps (required by hosting company). It seems policy has changed again or something, because trying to download files gets the following error:

    mirror: Access failed: 521 Data connection cannot be opened with this PROT setting.

    I can access the files just fine with Filezilla, but not lftp. I didn't change the code, but here it as anyway:

    lftp -f ~/the/file/below
    open -u USERNAME,PASSWORD DOMAIN
    lcd /local/place/to/put/files
    mirror
    quit
    I tried manually, login works fine, but nothing can be done after that. Help is appreciated, until this works again I've broken a backup system of mine.

  2. #2
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,907
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: lftp or other methods to connect to ftps://

    Are you sure you're really using FTPS with FileZilla and not SFTP?

  3. #3
    Join Date
    Apr 2009
    Beans
    264
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: lftp or other methods to connect to ftps://

    I tried using sftp from the terminal, and it failed. When they said sftp was also usable, I assume it's for those who have purchased ssh access or something.

  4. #4
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,907
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: lftp or other methods to connect to ftps://

    Quote Originally Posted by Muscovy View Post
    I assume it's for those who have purchased ssh access or something.
    I'd definitely recommend that, to be honest. FTPS is just a horrible non-standard rig where SSL got glued on top of good ol' unsafe and outdated FTP. SFTP however is a standard sub-protocol of SSH and it just works. So if there is a way you can get SSH access I'd recommend you try that.

  5. #5
    Join Date
    Apr 2009
    Beans
    264
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: lftp or other methods to connect to ftps://

    I'm not too worried about security. None of the files are secret, it's just the fastest way to download all of them (I don't fancy making a wget bot ). I looked up the lftp error, and discovered:

    "LIST will return '521 data connection cannot be opened with this PROT setting' when a client tries to list the content of a secured folder over a clear data connection."

  6. #6
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,907
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: lftp or other methods to connect to ftps://

    Quote Originally Posted by Muscovy View Post
    it's just the fastest way to download all of them (I don't fancy making a wget bot
    Never heard of rsync? Works tip top.

    rsync -av --progress ssh-login@remote-location:/remote/files/* /path/to/local/destination/


  7. #7
    Join Date
    Apr 2009
    Beans
    264
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: lftp or other methods to connect to ftps://

    I got this working by adding the following in the instructions file:

    set ftp:ssl-force true
    set ftp:ssl-protect-data true

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •