Re: Mirror: Access Failed ... No such file or directory
Alexander Lukyanov <[email protected]> Tue, 27 Jun 2017 18:17:22 +0000
| Newsgroups | gmane.network.lftp.user |
|---|---|
| Message-ID | <CANnoEwrLn2bgQGvaMyBBUXVHKKP4E+E+HLLts0+f+KszaL003Q@mail.gmail.com> |
--===============8973357205652352101== Content-Type: multipart/alternative; boundary="001a113d48bece2daf0552f514bf" --001a113d48bece2daf0552f514bf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The first directory on the mirror command line is the source, the second is the destination. With -R the source is local and the target is remote. So in your case you have to change the argument order. =D0=BF=D1=82, 21 =D0=B0=D0=BF=D1=80. 2017, 18:35 Alan Steel <alan@visagemob= ile.com>: > We are trying to replicate a local server directory structure to an FTP > server =E2=80=93 these directories exist on the local server, but do not = yet exist > on the FTP server. > > I think we are not using the correct combination of slashes at the > beginning and/or end of the =E2=80=9Csource=E2=80=9D and =E2=80=9Ctarget.= =E2=80=9D > > > > Following is our current batch file=E2=80=A6 > > > > #!/bin/bash > > set -x > > > > FTPHOST=3D'ourcompany.hostedftp.com' > > [email protected] > > FTPPASS=3Dftppassword > > FTPREMOTEFOLDER=3D/Servers/TestN01IL01/ > > FTPLOCALFOLDER=3D/opt/ftpusers/home > > FTPLOGFILE=3D/home/mysusername/ftp/lftp.log > > > > /usr/local/bin/lftp sftp://$FTPUSER:$FTPPASS@$FTPHOST -e " > > lcd $FTPLOCALFOLDER > > mirror -R --verbose =E2=80=93no-perms -X * $FTPREMOTEFOLDER $FTPLOCALFOLD= ER > > bye > > " >> $FTPLOGFILE > > > > When we run this, we get=E2=80=A6 > > lcd ok, local cwd=3D/opt/ftpusers/home > > mirror: Access failed: /Servers/TestN01IL01: No such file or directory > > > > Even though there is such a directory on the FTP server, and the login > user has full access to it. > > > > Can we use LFTP in this way to create the directory structure on the FTP > server, and, if so, what should our command look like? > > > > Thank you!! > > > > AGS > _______________________________________________ > lftp mailing list > [email protected] > http://univ.uniyar.ac.ru/mailman/listinfo/lftp > --001a113d48bece2daf0552f514bf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <p dir=3D"ltr">The first directory on the mirror command line is the source= , the second is the destination. With -R the source is local and the target= is remote. So in your case you have to change the argument order.</p> <br><div class=3D"gmail_quote"><div dir=3D"ltr">=D0=BF=D1=82, 21 =D0=B0=D0= =BF=D1=80. 2017, 18:35 Alan Steel <<a href=3D"mailto:[email protected]= om">[email protected]</a>>:<br></div><blockquote class=3D"gmail_quot= e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div lang=3D"EN-US" link=3D"#0563C1" vlink=3D"#954F72"> <div class=3D"m_-1198233870154360187WordSection1"> <p class=3D"MsoNormal">We are trying to replicate a local server directory = structure to an FTP server =E2=80=93 these directories exist on the local s= erver, but do not yet exist on the FTP server.<u></u><u></u></p> <p class=3D"MsoNormal">I think we are not using the correct combination of = slashes at the beginning and/or end of the =E2=80=9Csource=E2=80=9D and =E2= =80=9Ctarget.=E2=80=9D<u></u><u></u></p> <p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p> <p class=3D"MsoNormal">Following is our current batch file=E2=80=A6<u></u><= u></u></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console""><u></u>=C2=A0<u></u></spa= n></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">#!/bin/bash<u></u><u></u>= </span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">set -x<u></u><u></u></spa= n></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console""><u></u>=C2=A0<u></u></spa= n></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">FTPHOST=3D'<a href=3D= "http://ourcompany.hostedftp.com" target=3D"_blank">ourcompany.hostedftp.co= m</a>'<u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">FTPUSER=3D<a href=3D"mail= to:[email protected]" target=3D"_blank">[email protected]</a><u><= /u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">FTPPASS=3Dftppassword<u><= /u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">FTPREMOTEFOLDER=3D/Server= s/TestN01IL01/<u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">FTPLOCALFOLDER=3D/opt/ftp= users/home<u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">FTPLOGFILE=3D/home/mysuse= rname/ftp/lftp.log<u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console""><u></u>=C2=A0<u></u></spa= n></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">/usr/local/bin/lftp sftp:= //$FTPUSER:$FTPPASS@$FTPHOST -e "<u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">lcd $FTPLOCALFOLDER<u></u= ><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">mirror -R --verbose =E2= =80=93no-perms -X * $FTPREMOTEFOLDER $FTPLOCALFOLDER <u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">bye<u></u><u></u></span><= /p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">" >> $FTPLOGFI= LE<u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console""><u></u>=C2=A0<u></u></spa= n></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">When we run this, we get= =E2=80=A6<u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">lcd ok, local cwd=3D/opt/= ftpusers/home<u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">mirror: Access failed: /S= ervers/TestN01IL01: No such file or directory<u></u><u></u></span></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console""><u></u>=C2=A0<u></u></spa= n></p> <p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si= ze:10.0pt;font-family:"Lucida Console"">Even though there is such= a directory on the FTP server, and the login user has full access to it.<u= ></u><u></u></span></p> <p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p> <p class=3D"MsoNormal">Can we use LFTP in this way to create the directory = structure on the FTP server, and, if so, what should our command look like?= <u></u><u></u></p> <p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p> <p class=3D"MsoNormal">Thank you!!<u></u><u></u></p> <p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p> <p class=3D"MsoNormal">AGS<u></u><u></u></p> </div> </div> _______________________________________________<br> lftp mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a= ><br> <a href=3D"http://univ.uniyar.ac.ru/mailman/listinfo/lftp" rel=3D"noreferre= r" target=3D"_blank">http://univ.uniyar.ac.ru/mailman/listinfo/lftp</a><br> </blockquote></div> --001a113d48bece2daf0552f514bf-- --===============8973357205652352101== 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 --===============8973357205652352101==--