Discussion:
LFTP_HOME
Chris Fork
2013-01-13 10:10:06 UTC
Permalink
_______________________________________________
lftp mailing list
***@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
Justin Piszcz
2013-01-13 13:03:43 UTC
Permalink
I am having trouble convincing lftp to use the LFTP_HOME environment
variable for storing its files.
# LFTP_HOME="$PWD"; lftp -e "bookmark list; exit"
nothing is printed, though there is a bookmark file in the current
working directory. If I mv the bookmark file to the default LFTP_HOME,
it works.
I tried using strace to check where it was looking, and there was no
indication that it looked anywhere other than the default ~/.lftp/
directory for any files.
I've tried a few other options like expanding out $PWD and adding a / to
the end, to no effect.
lftp version 4.4.0
I reproduced your problem:

# mkdir lftp-test
# cd lftp-test
# cp -r ~/.lftp .
# export LFTP_HOME=$PWD
# lftp -e "bookmark list; exit"
#

The source code expects the .lftp directory at the end of the path.

# mkdir lftp-test2
# cd lftp-test2
# cp -r ~/.lftp .
# export LFTP_HOME=$PWD/.lftp
# lftp -e "bookmark list; exit"
ex1 ftp://a:***@XXXXX.XX.XXXXXX/
#

Justin.
Justin Piszcz
2013-01-13 13:07:33 UTC
Permalink
Post by Justin Piszcz
I am having trouble convincing lftp to use the LFTP_HOME environment
variable for storing its files.
# LFTP_HOME="$PWD"; lftp -e "bookmark list; exit"
nothing is printed, though there is a bookmark file in the current
working directory. If I mv the bookmark file to the default LFTP_HOME,
it works.
I tried using strace to check where it was looking, and there was no
indication that it looked anywhere other than the default ~/.lftp/
directory for any files.
I've tried a few other options like expanding out $PWD and adding a / to
the end, to no effect.
lftp version 4.4.0
# mkdir lftp-test
# cd lftp-test
# cp -r ~/.lftp .
# export LFTP_HOME=$PWD
# lftp -e "bookmark list; exit"
#
The source code expects the .lftp directory at the end of the path.
# mkdir lftp-test2
# cd lftp-test2
# cp -r ~/.lftp .
# export LFTP_HOME=$PWD/.lftp
# lftp -e "bookmark list; exit"
#
Justin.
By the way, this also works:

# mkdir lftp-test3
# cd lftp-test3
# cp ~/.lftp/bookmarks .
# export LFTP_HOME=$PWD
# lftp -e "bookmark list; exit"
ex1 ftp://a:***@XXXXX.XX.XXXXXX/

$ lftp --version
LFTP | Version 4.4.0 | Copyright (c) 1996-2012 Alexander V. Lukyanov

Justin.

Loading...