LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-08-2013, 08:20 PM   #1
dgerber
LQ Newbie
 
Registered: Jan 2013
Posts: 1

Rep: Reputation: Disabled
Error dowloading with lftp from sftp server: get: Access failed: No such file


I've successfully set up lftp upload (put) programs with another vendor on our servers via almost identical shell scripts but am having issues with a download (get/mirror) process. I can connect - list the directory..but when I attempt to get, mget or mirror the file - I receive the error:

get: Access failed: No such file

We have an inhouse server that has working lftp get scripts (using the mirror command) to an sftp server here at BDSC - so I
modified my programs to mirror these programs just to try a true test and still get the same error (s) from the vendor's server :


[root] atm:/stec/net/custom> vi lftpfilemain.ss

/stec/net/custom/lftpfile1.ss


[root] atm:/stec/net/custom> vi lftpfile1.ss

lftp -u "USER,PASS" sftp://208.72.248.104 <<EOF
lcd /tmp/atm
mirror -r
EOF
~

[root] atm:/stec/net/custom> /stec/net/custom/lftpfilemain.ss
mirror: Access failed: No such file (ET584369)
*********************************

I then tried running the same programs, redirected only to our SFTP server (placing a file with the same name on the server) - and it successfully downloaded to the CUs server.

We are able to successfully downlaod the file via a straigt sftp command line prompt.. but not via a lftp sftp command line..

[root] atm:/stec/net/custom> sftp K584369R@208.72.248.104
Connecting to 208.72.248.104...
"WARNING! THIS SYSTEM IS FOR AUTHORIZED USE ONLY! The information on this comput
er and network is the property of a private corporation and is protected by inte
llectual property rights. You must be assigned an account on this computer to ac
cess information and are only allowed to access information as defined by the sy
stem administrators. Use of company resources should be for business purposes on
ly and should be in compliance with the Code of Conduct and company policies and
procedures. As the property of a private corporation, your activities may be mo
nitored and/or recorded and you should have no expectation of privacy on this co
mputer and its networks. All actions are monitored and recorded. Use of this com
puter implies consent to monitoring and recording. CP2"
K584369R@208.72.248.104's password:
sftp> lcd /tmp/atm
sftp> get ET584369
Fetching /KONEECU-SITE/ET584369 to ET584369
/KONEECU-SITE/ET584369 81% 367KB 80.5KB/s 00:01 ETA
sftp> quit


I am STUMPED!

***********************************
I'm not a big fan of "the WIKI" but the only other thing that I've found is an article that refers to using lftp as an sftp client and the need for libssl in the library.


I listed the linked libraries and I don't see libssl in their ldd output.. do you think this could possibly be the issue?




http://how-to.wikia.com/wiki/How_to_..._a_sftp_client



How to use lftp as a sftp client Edit History Talk 0
1,772pages on
this wiki lftp is a very powerful and user friendly command line ftp client. It can also be used with many other protocols such as SFTP.



Check to see if lftp is compiled for sftp supportEdit1.find where lftp is installed
■type which lftp
example output: /usr/local/bin/lftp
2.Check linked libraries
■Execute: ldd /usr/local/bin/lftp
■Example output:
linux-gate.so.1 => (0xffffe000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7f8e000)
libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7f5c000)
libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0xb7e58000)
libreadline.so.5 => /lib/libreadline.so.5 (0xb7e28000)
libutil.so.1 => /lib/libutil.so.1 (0xb7e24000)
libncurses.so.5 => /lib/libncurses.so.5 (0xb7de2000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb7dd0000)
libdl.so.2 => /lib/libdl.so.2 (0xb7dcb000)
libm.so.6 => /lib/tls/libm.so.6 (0xb7da8000)
libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libgcc_s.so.1 (0xb7d9f000)
libc.so.6 => /lib/tls/libc.so.6 (0xb7c88000)
/lib/ld-linux.so.2 (0xb7fbc000)
3.To use sftp with lftp
■libssl must show like above.
libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7f5c000)
■the version and other info does not need to be the same but libssl must appear
■if libssl is not listed.
1.install SSL (sudo apt-get install libssl-dev)
2.recompile lftp with ssl support




/usr/bin/lftp
[root] atm:/stec/net/custom> ldd /usr/bin/lftp
libreadline.so.4 => /usr/lib/libreadline.so.4 (0x05ab5000)
libutil.so.1 => /lib/libutil.so.1 (0x00197000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0x00782000)
libresolv.so.2 => /lib/libresolv.so.2 (0x0072f000)
libdl.so.2 => /lib/libdl.so.2 (0x00580000)
libm.so.6 => /lib/tls/libm.so.6 (0x0055b000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00111000)
libc.so.6 => /lib/tls/libc.so.6 (0x0042a000)
/lib/ld-linux.so.2 (0x0040b000)
[root] atm:/stec/net/custom>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lftp mirror: Access failed: 550 /var/www/vhosts/test: No such file or directory speedy6 Linux - Software 11 10-22-2012 02:06 PM
LFTP - ls can see files but "get: Access failed: 404 filenotfound (.\ReadMe.txt)" occ MatthewSmith Linux - Laptop and Netbook 2 08-02-2012 02:32 PM
lftp - Access failed Jaythorpe Linux - Software 5 07-02-2012 06:01 AM
lftp - Access failed Jaythorpe Linux - Server 1 06-29-2012 02:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration