title: gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF
body: <p>I am attempting to use the <a href="https://gitlab.com" rel="nofollow noreferrer">Gitlab</a> pipeline ci in order to build my site and deploy it to my GoDaddy hosting via FTPS.  Right now everything is being done as dry-runs.  If I attempt to transfer to a new directory from my top level domain (www.mysite.com/build) the command will execute successfully both on my local machine as well as in the Gitlab pipeline.  However, if I attempt to overwrite the files from the top-level domain to actually update the site, it only works on my local but fails to connect from the Gitlab Pipeline.</p>
  
  <p><br>
  <strong>Command to transfer to a new directory:</strong>
  <br><em>(Dry-run executes fine from my Gitlab.com and from my local machine)</em></p>
  
  <pre><code>lftp -e "set ftp:ssl-force; set ssl:verify-certificate no; mirror -R --dry-run build/ ; quit" -u $FTP_USER,$FTP_PASSWORD $FTP_HOST --debug
  </code></pre>
  
  <p><br>
  <strong>Command to transfer to the top-level domain, overwriting existing code:</strong>
  <br><em>(Dry-run execute fine from my local machine but never manages to connect properly from Gitab.com)</em></p>
  
  <pre><code>lftp -e "set ftp:ssl-force; set ssl:verify-certificate no; mirror -R --dry-run build/ / ; quit" -u $FTP_USER,$FTP_PASSWORD $FTP_HOST --debug
  </code></pre>
  
  <p><br>
  I suspect this may be a problem with either GoDaddy or Gitlab's setup, but I wanted to check here first to see if I was missing any obvious mistakes.</p>
  
  <p>I have included the logs below with the <code>--debug</code> flag set.</p>
  
  <h2>Transfer to new directory (/build)</h2>
  
  <h3>Gitlab.com (working)</h3>
  
  <pre class="lang-none prettyprint-override"><code>$ lftp -e "set ftp:ssl-force; set ssl:verify-certificate no; mirror -R --dry-run build/ ; quit" -u $FTP_USER,$FTP_PASSWORD $FTP_HOST --debug
  ---- Connecting to &lt;my_domain&gt;.com (160.153.92.9) port 21
  &lt;--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
  &lt;--- 220-You are user number 1 of 500 allowed.
  &lt;--- 220-Local time is now 17:25. Server port: 21.
  &lt;--- 220-This is a private system - No anonymous login
  &lt;--- 220 You will be disconnected after 15 minutes of inactivity.
  ---&gt; FEAT
  &lt;--- 211-Extensions supported:
  &lt;---  EPRT
  &lt;---  IDLE
  &lt;---  MDTM
  &lt;---  SIZE
  &lt;---  MFMT
  &lt;---  REST STREAM
  &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
  &lt;---  MLSD
  &lt;---  AUTH TLS
  &lt;---  PBSZ
  &lt;---  PROT
  &lt;---  UTF8
  &lt;---  TVFS
  &lt;---  ESTA
  &lt;---  PASV
  &lt;---  EPSV
  &lt;---  SPSV
  &lt;---  ESTP
  &lt;--- 211 End.
  ---&gt; AUTH TLS
  &lt;--- 234 AUTH TLS OK.
  ---&gt; OPTS UTF8 ON
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  &lt;--- 200 OK, UTF-8 enabled
  ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
  &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
  ---&gt; USER &lt;my_user&gt;@&lt;my_domain&gt;.com
  &lt;--- 331 User &lt;my_user&gt;@&lt;my_domain&gt;.com OK. Password required
  ---&gt; PASS &lt;my_password&gt;
  &lt;--- 230-Your bandwidth usage is restricted
  &lt;--- 230 OK. Current restricted directory is /
  ---&gt; PWD
  &lt;--- 257 "/" is your current location
  ---&gt; PBSZ 0
  ---- CWD path to be sent is `/build'
  &lt;--- 200 PBSZ=0
  ---&gt; CWD /build
  &lt;--- 550 Can't change directory to /build: No such file or directory
  ---- CWD path to be sent is `/build/amp'
  ---&gt; CWD /build/amp
  &lt;--- 550 Can't change directory to /build/amp: No such file or directory
  &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
  &lt;&lt;&lt; FILES TRANSFERED-- OMITTED FOR BREVITY &gt;&gt;&gt;
  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
  Creating cache default...
  Created cache
  Job succeeded
  </code></pre>
  
  <p><br>    </p>
  
  <h3>Local Machine (working)</h3>
  
  <pre class="lang-none prettyprint-override"><code>$ lftp -e "set ftp:ssl-force; set ssl:verify-certificate no; mirror -R --dry-run build/ ; quit" -u &lt;my_user&gt;@&lt;my_domain&gt;,&lt;my_password&gt; &lt;my_domain&gt;
  mkdir -p ftp://&lt;my_user&gt;@&lt;my_domain&gt;:&lt;my_password&gt;@&lt;my_domain&gt;.com/build/
  &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
  &lt;&lt;&lt; FILES TRANSFERED-- OMITTED FOR BREVITY &gt;&gt;&gt;
  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;    
  Total: 48 directories, 299 files, 0 symlinks
  New: 299 files, 0 symlinks
  $
  </code></pre>
  
  <p><br><br></p>
  
  <h2>Transfer to top level domain (overwrite/update)</h2>
  
  <h3>Gitlab.com **(not working)**</h3>
  
  <pre class="lang-none prettyprint-override"><code>$ lftp -e "set ftp:ssl-force; set ssl:verify-certificate no; mirror -R --dry-run build/ / ; quit" -u $FTP_USER,$FTP_PASSWORD $FTP_HOST --debug
  ---- Connecting to &lt;my_domain&gt;.com (160.153.92.9) port 21
  &lt;--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
  &lt;--- 220-You are user number 1 of 500 allowed.
  &lt;--- 220-Local time is now 12:39. Server port: 21.
  &lt;--- 220-This is a private system - No anonymous login
  &lt;--- 220 You will be disconnected after 15 minutes of inactivity.
  ---&gt; FEAT
  &lt;--- 211-Extensions supported:
  &lt;---  EPRT
  &lt;---  IDLE
  &lt;---  MDTM
  &lt;---  SIZE
  &lt;---  MFMT
  &lt;---  REST STREAM
  &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
  &lt;---  MLSD
  &lt;---  AUTH TLS
  &lt;---  PBSZ
  &lt;---  PROT
  &lt;---  UTF8
  &lt;---  TVFS
  &lt;---  ESTA
  &lt;---  PASV
  &lt;---  EPSV
  &lt;---  SPSV
  &lt;---  ESTP
  &lt;--- 211 End.
  ---&gt; AUTH TLS
  &lt;--- 234 AUTH TLS OK.
  ---&gt; OPTS UTF8 ON
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  &lt;--- 200 OK, UTF-8 enabled
  ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
  &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
  ---&gt; USER &lt;my_user&gt;@&lt;my_domain&gt;.com
  &lt;--- 331 User &lt;my_user&gt;@&lt;my_domain&gt;.com OK. Password required
  ---&gt; PASS &lt;my_password&gt;
  &lt;--- 230-Your bandwidth usage is restricted
  &lt;--- 230 OK. Current restricted directory is /
  ---&gt; PWD
  &lt;--- 257 "/" is your current location
  ---&gt; PBSZ 0
  &lt;--- 200 PBSZ=0
  ---&gt; PROT P
  &lt;--- 200 Data protection level set to "private"
  ---&gt; PASV
  &lt;--- 227 Entering Passive Mode (160,153,92,9,195,195)
  ---- Connecting data socket to (160.153.92.9) port 50115
  ---- Data connection established
  ---&gt; LIST
  &lt;--- 150 Accepted data connection
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  **** Peer closed connection
  ---- Closing data socket
  ---- Closing control socket
  ---- Connecting to &lt;my_domain&gt;.com (160.153.92.9) port 21
  &lt;--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
  &lt;--- 220-You are user number 1 of 500 allowed.
  &lt;--- 220-Local time is now 12:40. Server port: 21.
  &lt;--- 220-This is a private system - No anonymous login
  &lt;--- 220 You will be disconnected after 15 minutes of inactivity.
  ---&gt; FEAT
  &lt;--- 211-Extensions supported:
  &lt;---  EPRT
  &lt;---  IDLE
  &lt;---  MDTM
  &lt;---  SIZE
  &lt;---  MFMT
  &lt;---  REST STREAM
  &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
  &lt;---  MLSD
  &lt;---  AUTH TLS
  &lt;---  PBSZ
  &lt;---  PROT
  &lt;---  UTF8
  &lt;---  TVFS
  &lt;---  ESTA
  &lt;---  PASV
  &lt;---  EPSV
  &lt;---  SPSV
  &lt;---  ESTP
  &lt;--- 211 End.
  ---&gt; AUTH TLS
  &lt;--- 234 AUTH TLS OK.
  ---&gt; OPTS UTF8 ON
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  &lt;--- 200 OK, UTF-8 enabled
  ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
  &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
  ---&gt; USER &lt;my_user&gt;@&lt;my_domain&gt;.com
  &lt;--- 331 User &lt;my_user&gt;@&lt;my_domain&gt;.com OK. Password required
  ---&gt; PASS &lt;my_password&gt;
  &lt;--- 230-Your bandwidth usage is restricted
  &lt;--- 230 OK. Current restricted directory is /
  ---&gt; PBSZ 0
  &lt;--- 200 PBSZ=0
  ---&gt; PROT P
  &lt;--- 200 Data protection level set to "private"
  ---&gt; PASV
  &lt;--- 227 Entering Passive Mode (160,153,92,9,196,113)
  ---- Connecting data socket to (160.153.92.9) port 50289
  ---- Data connection established
  ---&gt; LIST
  &lt;--- 150 Accepted data connection
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  **** Peer closed connection
  ---- Closing data socket
  ---- Closing control socket
  ---- Connecting to &lt;my_domain&gt;.com (160.153.92.9) port 21
  &lt;--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
  &lt;--- 220-You are user number 1 of 500 allowed.
  &lt;--- 220-Local time is now 12:40. Server port: 21.
  &lt;--- 220-This is a private system - No anonymous login
  &lt;--- 220 You will be disconnected after 15 minutes of inactivity.
  ---&gt; FEAT
  &lt;--- 211-Extensions supported:
  &lt;---  EPRT
  &lt;---  IDLE
  &lt;---  MDTM
  &lt;---  SIZE
  &lt;---  MFMT
  &lt;---  REST STREAM
  &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
  &lt;---  MLSD
  &lt;---  AUTH TLS
  &lt;---  PBSZ
  &lt;---  PROT
  &lt;---  UTF8
  &lt;---  TVFS
  &lt;---  ESTA
  &lt;---  PASV
  &lt;---  EPSV
  &lt;---  SPSV
  &lt;---  ESTP
  &lt;--- 211 End.
  ---&gt; AUTH TLS
  &lt;--- 234 AUTH TLS OK.
  ---&gt; OPTS UTF8 ON
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  &lt;--- 200 OK, UTF-8 enabled
  ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
  &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
  ---&gt; USER &lt;my_user&gt;@&lt;my_domain&gt;.com
  &lt;--- 331 User &lt;my_user&gt;@&lt;my_domain&gt;.com OK. Password required
  ---&gt; PASS &lt;my_password&gt;
  &lt;--- 230-Your bandwidth usage is restricted
  &lt;--- 230 OK. Current restricted directory is /
  ---&gt; PBSZ 0
  &lt;--- 200 PBSZ=0
  ---&gt; PROT P
  &lt;--- 200 Data protection level set to "private"
  ---&gt; PASV
  &lt;--- 227 Entering Passive Mode (160,153,92,9,196,246)
  ---- Connecting data socket to (160.153.92.9) port 50422
  ---- Data connection established
  ---&gt; LIST
  &lt;--- 150 Accepted data connection
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  **** Peer closed connection
  ---- Closing data socket
  ---- Closing control socket
  ---- Connecting to &lt;my_domain&gt;.com (160.153.92.9) port 21
  &lt;--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
  &lt;--- 220-You are user number 1 of 500 allowed.
  &lt;--- 220-Local time is now 12:41. Server port: 21.
  &lt;--- 220-This is a private system - No anonymous login
  &lt;--- 220 You will be disconnected after 15 minutes of inactivity.
  ---&gt; FEAT
  &lt;--- 211-Extensions supported:
  &lt;---  EPRT
  &lt;---  IDLE
  &lt;---  MDTM
  &lt;---  SIZE
  &lt;---  MFMT
  &lt;---  REST STREAM
  &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
  &lt;---  MLSD
  &lt;---  AUTH TLS
  &lt;---  PBSZ
  &lt;---  PROT
  &lt;---  UTF8
  &lt;---  TVFS
  &lt;---  ESTA
  &lt;---  PASV
  &lt;---  EPSV
  &lt;---  SPSV
  &lt;---  ESTP
  &lt;--- 211 End.
  ---&gt; AUTH TLS
  &lt;--- 234 AUTH TLS OK.
  ---&gt; OPTS UTF8 ON
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  &lt;--- 200 OK, UTF-8 enabled
  ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
  &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
  ---&gt; USER &lt;my_user&gt;@&lt;my_domain&gt;.com
  &lt;--- 331 User &lt;my_user&gt;@&lt;my_domain&gt;.com OK. Password required
  ---&gt; PASS &lt;my_password&gt;
  &lt;--- 230-Your bandwidth usage is restricted
  &lt;--- 230 OK. Current restricted directory is /
  ---&gt; PBSZ 0
  &lt;--- 200 PBSZ=0
  ---&gt; PROT P
  &lt;--- 200 Data protection level set to "private"
  ---&gt; PASV
  &lt;--- 227 Entering Passive Mode (160,153,92,9,198,255)
  ---- Connecting data socket to (160.153.92.9) port 50943
  ---- Data connection established
  ---&gt; LIST
  &lt;--- 150 Accepted data connection
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  **** Peer closed connection
  ---- Closing data socket
  ---- Closing control socket
  ---- Connecting to &lt;my_domain&gt;.com (160.153.92.9) port 21
  &lt;--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
  &lt;--- 220-You are user number 1 of 500 allowed.
  &lt;--- 220-Local time is now 12:42. Server port: 21.
  &lt;--- 220-This is a private system - No anonymous login
  &lt;--- 220 You will be disconnected after 15 minutes of inactivity.
  ---&gt; FEAT
  &lt;--- 211-Extensions supported:
  &lt;---  EPRT
  &lt;---  IDLE
  &lt;---  MDTM
  &lt;---  SIZE
  &lt;---  MFMT
  &lt;---  REST STREAM
  &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
  &lt;---  MLSD
  &lt;---  AUTH TLS
  &lt;---  PBSZ
  &lt;---  PROT
  &lt;---  UTF8
  &lt;---  TVFS
  &lt;---  ESTA
  &lt;---  PASV
  &lt;---  EPSV
  &lt;---  SPSV
  &lt;---  ESTP
  &lt;--- 211 End.
  ---&gt; AUTH TLS
  &lt;--- 234 AUTH TLS OK.
  ---&gt; OPTS UTF8 ON
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  &lt;--- 200 OK, UTF-8 enabled
  ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
  &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
  ---&gt; USER &lt;my_user&gt;@&lt;my_domain&gt;.com
  &lt;--- 331 User &lt;my_user&gt;@&lt;my_domain&gt;.com OK. Password required
  ---&gt; PASS &lt;my_password&gt;
  &lt;--- 230-Your bandwidth usage is restricted
  &lt;--- 230 OK. Current restricted directory is /
  ---&gt; PBSZ 0
  &lt;--- 200 PBSZ=0
  ---&gt; PROT P
  &lt;--- 200 Data protection level set to "private"
  ---&gt; PASV
  &lt;--- 227 Entering Passive Mode (160,153,92,9,196,44)
  ---- Connecting data socket to (160.153.92.9) port 50220
  ---- Data connection established
  ---&gt; LIST
  &lt;--- 150 Accepted data connection
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  **** Peer closed connection
  ---- Closing data socket
  ---- Closing control socket
  ---- Connecting to &lt;my_domain&gt;.com (160.153.92.9) port 21
  &lt;--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
  &lt;--- 220-You are user number 1 of 500 allowed.
  &lt;--- 220-Local time is now 12:44. Server port: 21.
  &lt;--- 220-This is a private system - No anonymous login
  &lt;--- 220 You will be disconnected after 15 minutes of inactivity.
  ---&gt; FEAT
  &lt;--- 211-Extensions supported:
  &lt;---  EPRT
  &lt;---  IDLE
  &lt;---  MDTM
  &lt;---  SIZE
  &lt;---  MFMT
  &lt;---  REST STREAM
  &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
  &lt;---  MLSD
  &lt;---  AUTH TLS
  &lt;---  PBSZ
  &lt;---  PROT
  &lt;---  UTF8
  &lt;---  TVFS
  &lt;---  ESTA
  &lt;---  PASV
  &lt;---  EPSV
  &lt;---  SPSV
  &lt;---  ESTP
  &lt;--- 211 End.
  ---&gt; AUTH TLS
  &lt;--- 234 AUTH TLS OK.
  ---&gt; OPTS UTF8 ON
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  &lt;--- 200 OK, UTF-8 enabled
  ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
  &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
  ---&gt; USER &lt;my_user&gt;@&lt;my_domain&gt;.com
  &lt;--- 331 User &lt;my_user&gt;@&lt;my_domain&gt;.com OK. Password required
  ---&gt; PASS &lt;my_password&gt;
  &lt;--- 230-Your bandwidth usage is restricted
  &lt;--- 230 OK. Current restricted directory is /
  ---&gt; PBSZ 0
  &lt;--- 200 PBSZ=0
  ---&gt; PROT P
  &lt;--- 200 Data protection level set to "private"
  ---&gt; PASV
  &lt;--- 227 Entering Passive Mode (160,153,92,9,197,243)
  ---- Connecting data socket to (160.153.92.9) port 50675
  ---- Data connection established
  ---&gt; LIST
  &lt;--- 150 Accepted data connection
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  **** Peer closed connection
  ---- Closing data socket
  ---- Closing control socket
  ---- Connecting to &lt;my_domain&gt;.com (160.153.92.9) port 21
  &lt;--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
  &lt;--- 220-You are user number 1 of 500 allowed.
  &lt;--- 220-Local time is now 12:46. Server port: 21.
  &lt;--- 220-This is a private system - No anonymous login
  &lt;--- 220 You will be disconnected after 15 minutes of inactivity.
  ---&gt; FEAT
  &lt;--- 211-Extensions supported:
  &lt;---  EPRT
  &lt;---  IDLE
  &lt;---  MDTM
  &lt;---  SIZE
  &lt;---  MFMT
  &lt;---  REST STREAM
  &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
  &lt;---  MLSD
  &lt;---  AUTH TLS
  &lt;---  PBSZ
  &lt;---  PROT
  &lt;---  UTF8
  &lt;---  TVFS
  &lt;---  ESTA
  &lt;---  PASV
  &lt;---  EPSV
  &lt;---  SPSV
  &lt;---  ESTP
  &lt;--- 211 End.
  ---&gt; AUTH TLS
  &lt;--- 234 AUTH TLS OK.
  ---&gt; OPTS UTF8 ON
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name '&lt;my_domain&gt;.com'
  &lt;--- 200 OK, UTF-8 enabled
  ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
  &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
  ---&gt; USER &lt;my_user&gt;@&lt;my_domain&gt;.com
  &lt;--- 331 User &lt;my_user&gt;@&lt;my_domain&gt;.com OK. Password required
  ---&gt; PASS &lt;my_password&gt;
  &lt;--- 230-Your bandwidth usage is restricted
  &lt;--- 230 OK. Current restricted directory is /
  ---&gt; PBSZ 0
  &lt;--- 200 PBSZ=0
  ---&gt; PROT P
  &lt;--- 200 Data protection level set to "private"
  ---&gt; PASV
  &lt;--- 227 Entering Passive Mode (160,153,92,9,197,36)
  ---- Connecting data socket to (160.153.92.9) port 50468
  ---- Data connection established
  ---&gt; LIST
  &lt;--- 150 Accepted data connection
  gnutls_record_recv: The TLS connection was non-properly terminated. Assuming EOF.
  **** Peer closed connection
  ---- Closing data socket
  ---- Closing control socket
  </code></pre>
  
  <p><br></p>
  
  <h3>Local Machine (working)</h3>
  
  <pre class="lang-none prettyprint-override"><code>$ lftp -e "set ftp:ssl-force; set ssl:verify-certificate no; mirror -R --dry-run build/ / ; quit" -u &lt;my_user&gt;@&lt;my_domain&gt;.com,&lt;my_password&gt; ftp://&lt;my_domain&gt;.com --debug
  mkdir -p ftp://&lt;my_user&gt;%40&lt;my_domain&gt;.com:&lt;my_password&gt;@&lt;my_domain&gt;.com/%2F
  ---- Connecting to &lt;my_domain&gt;.com (160.153.92.9) port 21
  &lt;--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
  &lt;--- 220-You are user number 1 of 500 allowed.
  &lt;--- 220-Local time is now 12:27. Server port: 21.
  &lt;--- 220-This is a private system - No anonymous login
  &lt;--- 220 You will be disconnected after 15 minutes of inactivity.
  ---&gt; FEAT
  &lt;--- 211-Extensions supported:
  &lt;---  EPRT
  &lt;---  IDLE
  &lt;---  MDTM
  &lt;---  SIZE
  &lt;---  MFMT
  &lt;---  REST STREAM
  &lt;---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
  &lt;---  MLSD
  &lt;---  AUTH TLS
  &lt;---  PBSZ
  &lt;---  PROT
  &lt;---  UTF8
  &lt;---  TVFS
  &lt;---  ESTA
  &lt;---  PASV
  &lt;---  EPSV
  &lt;---  SPSV
  &lt;---  ESTP
  &lt;--- 211 End.
  ---&gt; AUTH TLS
  &lt;--- 234 AUTH TLS OK.
  ---&gt; OPTS UTF8 ON
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name ‘&lt;my_domain&gt;.com’
  &lt;--- 200 OK, UTF-8 enabled
  ---&gt; OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
  &lt;--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
  ---&gt; USER &lt;my_user&gt;@&lt;my_domain&gt;.com
  &lt;--- 331 User &lt;my_user&gt;@&lt;my_domain&gt;.com OK. Password required
  ---&gt; PASS &lt;my_password&gt;
  &lt;--- 230-Your bandwidth usage is restricted
  &lt;--- 230 OK. Current restricted directory is /
  ---&gt; PWD
  &lt;--- 257 "/" is your current location
  ---&gt; PBSZ 0
  &lt;--- 200 PBSZ=0
  ---&gt; PROT P
  &lt;--- 200 Data protection level set to "private"
  ---&gt; PASV
  &lt;--- 227 Entering Passive Mode (160,153,92,9,198,83)
  ---- Connecting data socket to (160.153.92.9) port 50771
  ---- Data connection established
  ---&gt; LIST
  &lt;--- 150 Accepted data connection
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name ‘&lt;my_domain&gt;.com’
  ---- Got EOF on data connection
  ---- Closing data socket
  &lt;--- 226-Options: -a -l
  &lt;--- 226 15 matches total
  ---&gt; TYPE I
  &lt;--- 200 TYPE is now 8-bit binary
  ---&gt; MDTM .
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM ..
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM .ftpquota
  &lt;--- 213 20160818042222
  ---&gt; MDTM .htaccess
  &lt;--- 213 20151121060928
  ---&gt; MDTM cgi-bin
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM css
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM cssinstaglam
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM favicon.ico
  &lt;--- 213 20151003060945
  ---&gt; MDTM fonts
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM iamdev
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM img
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM index.html
  &lt;--- 213 20151118040443
  ---&gt; MDTM less
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM svg
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM zoescorner.net
  &lt;--- 550 I can only retrieve regular files
  get -e -O ftp://&lt;my_user&gt;%40&lt;my_domain&gt;.com:&lt;my_password&gt;@&lt;my_domain&gt;.com/ file:&lt;local_project_path&gt;/build/.htaccess
  get -e -O ftp://&lt;my_user&gt;%40&lt;my_domain&gt;.com:&lt;my_password&gt;@&lt;my_domain&gt;.com/ file:&lt;local_project_path&gt;/build/favicon.ico
  get -e -O ftp://&lt;my_user&gt;%40&lt;my_domain&gt;.com:&lt;my_password&gt;@&lt;my_domain&gt;.com/ file:&lt;local_project_path&gt;/build/index.html
  mkdir ftp://&lt;my_user&gt;%40&lt;my_domain&gt;.com:&lt;my_password&gt;@&lt;my_domain&gt;.com/amp
  ---- CWD path to be sent is `/amp'
  ---&gt; CWD /amp
  &lt;--- 550 Can't change directory to /amp: No such file or directory
  get -O ftp://&lt;my_user&gt;%40&lt;my_domain&gt;.com:&lt;my_password&gt;@&lt;my_domain&gt;.com/amp file:&lt;local_project_path&gt;/build/amp/index.html
  chmod 755 ftp://&lt;my_user&gt;%40&lt;my_domain&gt;.com:&lt;my_password&gt;@&lt;my_domain&gt;.com/amp/index.html
  ---- CWD path to be sent is `/cssinstaglam'
  ---&gt; CWD /cssinstaglam
  &lt;--- 250 OK. Current directory is /cssinstaglam
  ---&gt; TYPE A
  &lt;--- 200 TYPE is now ASCII
  ---&gt; PASV
  &lt;--- 227 Entering Passive Mode (160,153,92,9,196,111)
  ---- Connecting data socket to (160.153.92.9) port 50287
  ---- Data connection established
  ---&gt; LIST
  &lt;--- 150 Accepted data connection
  Certificate: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
   Issued by: EMAIL=ssl@p3plcpnl0953.prod.phx3.secureserver.net,CN=p3plcpnl0953.prod.phx3.secureserver.net
  WARNING: Certificate verification: Not trusted
  WARNING: Certificate verification: certificate common name doesn't match requested host name ‘&lt;my_domain&gt;.com’
  ---- Got EOF on data connection
  ---- Closing data socket
  &lt;--- 226-Options: -a -l
  &lt;--- 226 10 matches total
  ---&gt; TYPE I
  &lt;--- 200 TYPE is now 8-bit binary
  ---&gt; MDTM .
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM ..
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM .include_in_version_control
  &lt;--- 213 20151003060948
  ---&gt; MDTM css
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM favicon.ico
  &lt;--- 213 20151003060948
  ---&gt; MDTM img
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM index.html
  &lt;--- 213 20151117055333
  ---&gt; MDTM js
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM less
  &lt;--- 550 I can only retrieve regular files
  ---&gt; MDTM libs
  &lt;--- 550 I can only retrieve regular files
  get -e -O ftp://&lt;my_user&gt;%40&lt;my_domain&gt;.com:&lt;my_password&gt;@&lt;my_domain&gt;.com/cssinstaglam file:&lt;local_project_path&gt;/build/cssinstaglam/favicon.ico
  get -e -O ftp://&lt;my_user&gt;%40&lt;my_domain&gt;.com:&lt;my_password&gt;@&lt;my_domain&gt;.com/cssinstaglam file:&lt;local_project_path&gt;/build/cssinstaglam/index.html
  &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
  &lt;&lt;&lt; FILES TRANSFERED-- OMITTED FOR BREVITY &gt;&gt;&gt;
  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
  Total: 48 directories, 299 files, 0 symlinks
  New: 4 files, 0 symlinks
  Modified: 295 files, 0 symlinks
  To be removed: 7 directories, 5 files, 0 symlinks
  ---&gt; QUIT
  ---- Closing control socket
  </code></pre>