On Wed, 6 Apr 2016 10:14:40 +0200, hw wrote:

> Mick schrieb:
> > On Tuesday 05 Apr 2016 20:06:08 hw wrote:  
> >> Neil Bothwick schrieb:  
> >>> On Tue, 5 Apr 2016 14:43:25 +0200, hw wrote:  
> >>>> how do you use lftp (to mirror a remote site)
> >>>> when the password you have contains a bracket?
> >>>>
> >>>> I'm trying 'lftp -u user,pass(word ftp.example.com', and
> >>>> there appears to be no way to escape characters in the
> >>>> password.  Using single quotes also doesn't work, same
> >>>> as 'lftp 'ftp://user:pass(w...@example.com'.  
> >>>
> >>> Try lftp 'ftp://user:pass\(w...@example.com'
> >>> or  lftp ftp://user:pass\\\(w...@example.com
> >>>
> >>> The \ escapes the ( and the single quotes protect it fro the shell.
> >>> In the second way, you escape the \ as well.  
> >>
> >> That's what I thought :)  I already tried and it didn't
> >> work.  
> >
> > Did you try putting single/double quotes around passwd only?
> >  
> 
> Yes, that didn't work, either.

I had a quick look at the man page and it says that parentheses can be
used to group commands, so maybe lftp is misinterpreting the ( in this
way.

However, the man page also advises against giving the password on the
command line (because it is then available to anyone with normal user
shell access while the command is running) and suggests using either
~/.netrc, which you have already said works, or $LFTP_PASSWORD along
with --env-password. Have you tried this?

LFTP_PASSWORD='pass(word' lftp --env-password -u user ftp://example.com


-- 
Neil Bothwick

Isn't it a bit unnerving that doctors call what they do "practice?"

Attachment: pgpz1gmpFOspG.pgp
Description: OpenPGP digital signature

Reply via email to