Re: lftp issued “CWD /” results in e rror message but the transfer does not fail
"Kevin R. Bulgrien" <[email protected]> Mon, 26 Aug 2019 10:25:57 -0500 (CDT)
| Newsgroups | gmane.network.lftp.user |
|---|---|
| Message-ID | <430745059.150.1566833147271.JavaMail.KevinB@CSDI-LAP-KEVINB> |
--===============1910635524237855258== Content-Type: multipart/alternative; boundary="----=_Part_149_162225102.1566833147268" ------=_Part_149_162225102.1566833147268 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks, yes, a tilde following works as desired, however, I feel somewhat= =20 disappointed that I didn't previously think about simply dropping the=20 trailing slash from the URL. For example:=20 ftps:// server.example.net vs. ftps:// server.example.net /=20 --=20 Kevin R. Bulgrien=20 ----- Original Message ----- > From: "Alexander Lukyanov" <[email protected]> > To: "Kevin R. Bulgrien" <[email protected]> > Cc: "LFTP Mailing List" <[email protected]> > Sent: Saturday, August 24, 2019 4:39:21 AM > Subject: Re: [lftp] lftp issued =E2=80=9CCWD /=E2=80=9D results in error = message but > the transfer does not fail > Try adding a tilde at the end of url. > =D0=BF=D1=82, 23 =D0=B0=D0=B2=D0=B3. 2019, 18:30 Kevin R. Bulgrien < > [email protected] >: > > In a scripted and automated process, it seems beneficial to avoid >=20 > > generating unwanted error messages that do not indicate an actual >=20 > > fault, if only to avoid confusion when someone looks at the logs. >=20 > > Given an lftp command similar to the following: >=20 > > lftp -vv -d -c set ssl:ca-file /path/to/cert/ftps_cron-bundle.crt; > > set ssl:check-hostname no; set ftp:ssl-protect-data true; set > > sftp:connect-program "ssh -a -x -o PubkeyAuthentication=3Dno"; set > > net:max-retries 2; open -e 'put /path/to/data/upload.txt;' -u > > username:password ftps:// server.example.net/ >=20 > > The command template works on various servers, but, on one server, >=20 > > even though the upload is successful, an error message is shown: >=20 > > ---- CWD path to be sent is `/' >=20 > > <--- 200 Command OPTS succeed >=20 > > ---> CWD / >=20 > > <--- 550 Permission denied >=20 > > cd: Access failed: 550 Permission denied (/) >=20 > > How does one prevent lftp from sending CWD / to this server >=20 > > <--- 230 User logged in >=20 > > ---> FEAT >=20 > > <--- 211-Extensions supported >=20 > > <--- SIZE >=20 > > <--- XMD5 >=20 > > <--- XSHA1 >=20 > > <--- XSHA256 >=20 > > <--- XSHA512 >=20 > > <--- XQUOTA >=20 > > <--- LANG EN, ES, FR, GE >=20 > > <--- MDTM >=20 > > <--- MLST size*;type*;perm*;create*;modify*; >=20 > > <--- REST STREAM >=20 > > <--- TVFS >=20 > > <--- UTF8 >=20 > > <--- AUTH SSL;TLS-P; >=20 > > <--- PBSZ >=20 > > <--- PROT C;P; >=20 > > <--- 211 end >=20 > > ---> PWD >=20 > > <--- 257 "/username/folder" is current directory >=20 > > ---> PBSZ 0 >=20 > > <--- 200 PBSZ=3D0 >=20 > > ---> PROT P >=20 > > <--- 200 PRIVATE data channel protection level set >=20 > > ---> LANG >=20 > > <--- 200 Default languages set to EN >=20 > > ---> OPTS UTF8 ON >=20 > > <--- 200 Command OPTS succeed >=20 > > ---> OPTS MLST size;type;perm;modify; >=20 > > ---- CWD path to be sent is `/' >=20 > > Note that the server automatically sets its default upload >=20 > > directory based on the username... i.e. /username/folder >=20 > > The upload should go to this default upload directory without >=20 > > generating an error message. It does get uploaded, but the >=20 > > log shows the error message: >=20 > > cd: Access failed: 550 Permission denied (/) >=20 > > ---> TYPE I >=20 > > <--- 200 Transfer mode set to BINARY >=20 > > ---> PASV >=20 > > <--- 227 Entering Passive Mode (10,10,35,21,195,225). >=20 > > ---- Address returned by PASV seemed to be incorrect and has been > > fixed >=20 > > ---- Connecting data socket to (nnn.nnn.nnn.nnn) port 50145 >=20 > > ---- Data connection established >=20 > > ---> ALLO 148891 >=20 > > <--- 200 Command ALLO succeed >=20 > > ---> STOR upload.txt >=20 > > <--- 150 Uploading in BINARY file upload.txt >=20 > > Certificate: ... >=20 > > Issued by: ... >=20 > > Trusted >=20 > > WARNING: Certificate verification: hostname checking disabled >=20 > > ---- Closing data socket >=20 > > <--- 226 Transfer completed >=20 > > ---> SITE UTIME 20190819100016 upload.txt >=20 > > <--- 550 Command SITE failed >=20 > > ---> QUIT >=20 > > ---- Closing control socket >=20 > > A number of things have been tried. For example, using various >=20 > > paths with the put command. >=20 > > * put -O . /path/to/data/upload.txt >=20 > > * put -O /username/folder /path/to/data/upload.txt >=20 > > Explicitly placing a cd /username/folder command was also > > attempted. >=20 > > Removing -vv and -d are ineffective as well. >=20 > > How can lftp be made to avoid automatically issuing the "CWD /" >=20 > > that causes the unwanted and confusing error message that does >=20 > > not mean an operation intended by the user actually failed? >=20 > > Alternatively, as opposed to stopping the issuance of the "CWD /", >=20 > > how might one at least suppress its being treated as an error >=20 > > without also suppressing real errors? >=20 > > Experienced on RHEL 7: >=20 > > $ lftp --version >=20 > > LFTP | Version 4.4.8 | Copyright (c) 1996-2013 Alexander V. > > Lukyanov >=20 > > ... >=20 > > Libraries used: Readline 6.2 >=20 > > -- >=20 > > Kevin R. Bulgrien >=20 > > _______________________________________________ >=20 > > lftp mailing list >=20 > > [email protected] >=20 > > http://univ.uniyar.ac.ru/mailman/listinfo/lftp >=20 ------=_Part_149_162225102.1566833147268 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head><style type=3D'text/css'>p { margin: 0; }</style></head><body><= div style=3D'font-family: arial,helvetica,sans-serif; font-size: 10pt; colo= r: #000000'>Thanks, yes, a tilde following works as desired, however,= I feel somewhat<div>disappointed <span style=3D"font-size: 10pt;">tha= t I didn't previously think about</span><span style=3D"font-size: 10pt;">&n= bsp;simply dropping the</span></div><div><span style=3D"font-size: 10pt;">t= railing slash </span><span style=3D"font-size: 10pt;">from the </= span><span style=3D"font-size: 10pt;">URL.</span><span style=3D"font-size: = 10pt;"> For example:</span></div><div><div><div><div><br></div><div><= span style=3D"font-family: Helvetica, Arial, sans-serif; font-size: 16px;">= ftps://</span><a href=3D"http://server.example.net/" rel=3D"noreferrer nore= ferrer" target=3D"_blank" style=3D"font-family: Helvetica, Arial, sans-seri= f; font-size: 16px;">server.example.net</a> vs. <span style=3D"fo= nt-family: Helvetica, Arial, sans-serif; font-size: 16px;">ftps://</span><a= href=3D"http://server.example.net/" rel=3D"noreferrer noreferrer" target= =3D"_blank" style=3D"font-family: Helvetica, Arial, sans-serif; font-size: = 16px;">server.example.net</a>/</div><div></div><div><br></div><div></div><d= iv></div><div><div><span name=3D"x"></span>--<br><br>Kevin R. Bulgrien</div= ><div id=3D"ea9888ce-e6e7-4221-81cf-04ae291aac60"><br></div><hr id=3D"zwchr= "><blockquote style=3D"border-left:2px solid #1010FF;margin-left:5px;paddin= g-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:= none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"= Alexander Lukyanov" <[email protected]><br><b>To: </b>"Kevin R. Bulgr= ien" <[email protected]><br><b>Cc: </b>"LFTP Mailing List" = <[email protected]><br><b>Sent: </b>Saturday, August 24, 2019 4:39:21= AM<br><b>Subject: </b>Re: [lftp] lftp issued =E2=80=9CCWD /=E2=80=9D resul= ts in error message but the transfer does not fail<br><br><div dir=3D"auto"= ><div>Try adding a tilde at the end of url.<br><br><div class=3D"gmail_quot= e"><div dir=3D"ltr" class=3D"gmail_attr">=D0=BF=D1=82, 23 =D0=B0=D0=B2=D0= =B3. 2019, 18:30 Kevin R. Bulgrien <<a href=3D"mailto:kevinb@systemsdesi= gnusa.com" target=3D"_blank">[email protected]</a>>:<br></div>= <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">In a scripted and automated process, it seem= s beneficial to avoid<br> generating unwanted error messages that do not indicate an actual<br> fault, if only to avoid confusion when someone looks at the logs.<br> <br> Given an lftp command similar to the following:<br> <br> lftp -vv -d -c set ssl:ca-file /path/to/cert/ftps_cron-bundle.crt; set ssl:= check-hostname no; set ftp:ssl-protect-data true; set sftp:connect-program = "ssh -a -x -o PubkeyAuthentication=3Dno"; set net:max-retries 2; open -e 'p= ut /path/to/data/upload.txt;' -u username:password ftps://<a href=3D"http:/= /server.example.net/" rel=3D"noreferrer noreferrer" target=3D"_blank">serve= r.example.net/</a><br> <br> The command template works on various servers, but, on one server,<br> even though the upload is successful, an error message is shown:<br> <br> ---- CWD path to be sent is `/'<br> <--- 200 Command OPTS succeed<br> ---> CWD /<br> <--- 550 Permission denied<br> cd: Access failed: 550 Permission denied (/)<br> <br> How does one prevent lftp from sending CWD / to this server<br> <br> <--- 230 User logged in<br> ---> FEAT<br> <--- 211-Extensions supported<br> <--- SIZE<br> <--- XMD5<br> <--- XSHA1<br> <--- XSHA256<br> <--- XSHA512<br> <--- XQUOTA<br> <--- LANG EN, ES, FR, GE<br> <--- MDTM<br> <--- MLST size*;type*;perm*;create*;modify*;<b= r> <--- REST STREAM<br> <--- TVFS<br> <--- UTF8<br> <--- AUTH SSL;TLS-P;<br> <--- PBSZ<br> <--- PROT C;P;<br> <--- 211 end<br> ---> PWD<br> <--- 257 "/username/folder" is current directory<br> ---> PBSZ 0<br> <--- 200 PBSZ=3D0<br> ---> PROT P<br> <--- 200 PRIVATE data channel protection level set<br> ---> LANG<br> <--- 200 Default languages set to EN<br> ---> OPTS UTF8 ON<br> <--- 200 Command OPTS succeed<br> ---> OPTS MLST size;type;perm;modify;<br> ---- CWD path to be sent is `/'<br> <br> Note that the server automatically sets its default upload<br> directory based on the username... i.e. /username/folder<br> <br> The upload should go to this default upload directory without<br> generating an error message. It does get uploaded, but the<br> log shows the error message:<br> <br> cd: Access failed: 550 Permission denied (/)<br> ---> TYPE I<br> <--- 200 Transfer mode set to BINARY<br> ---> PASV<br> <--- 227 Entering Passive Mode (10,10,35,21,195,225).<br> ---- Address returned by PASV seemed to be incorrect and has been fi= xed<br> ---- Connecting data socket to (nnn.nnn.nnn.nnn) port 50145<br> ---- Data connection established<br> ---> ALLO 148891<br> <--- 200 Command ALLO succeed<br> ---> STOR upload.txt<br> <--- 150 Uploading in BINARY file upload.txt<br> Certificate: ...<br> Issued by: ...<br> Trusted<br> WARNING: Certificate verification: hostname checking disabled<br> ---- Closing data socket<br> <--- 226 Transfer completed<br> ---> SITE UTIME 20190819100016 upload.txt<br> <--- 550 Command SITE failed<br> ---> QUIT<br> ---- Closing control socket<br> <br> A number of things have been tried. For example, using various<br> paths with the put command.<br> <br> * put -O . /path/to/data/upload.txt<br> * put -O /username/folder /path/to/data/upload.txt<br> <br> Explicitly placing a cd /username/folder command was also attempted.<br> <br> Removing -vv and -d are ineffective as well.<br> <br> How can lftp be made to avoid automatically issuing the "CWD /"<br> that causes the unwanted and confusing error message that does<br> not mean an operation intended by the user actually failed?<br> <br> Alternatively, as opposed to stopping the issuance of the "CWD /",<br> how might one at least suppress its being treated as an error<br> without also suppressing real errors?<br> <br> Experienced on RHEL 7:<br> <br> $ lftp --version<br> LFTP | Version 4.4.8 | Copyright (c) 1996-2013 Alexander V. Lukyanov<br> ...<br> Libraries used: Readline 6.2<br> <br> --<br> <br> Kevin R. Bulgrien<br> _______________________________________________<br> lftp mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank" rel=3D"noreferrer">l= [email protected]</a><br> <a href=3D"http://univ.uniyar.ac.ru/mailman/listinfo/lftp" rel=3D"noreferre= r noreferrer" target=3D"_blank">http://univ.uniyar.ac.ru/mailman/listinfo/l= ftp</a><br> </blockquote></div></div></div> </blockquote><br></div></div></div></div></div></body></html> ------=_Part_149_162225102.1566833147268-- --===============1910635524237855258== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lftp mailing list [email protected] http://univ.uniyar.ac.ru/mailman/listinfo/lftp --===============1910635524237855258==--