* ftp-client w/o controlling tty
@ 2005-01-17 11:52 T. Horsnell (tsh)
0 siblings, 0 replies; 2+ messages in thread
From: T. Horsnell (tsh) @ 2005-01-17 11:52 UTC (permalink / raw)
Hi all,
I'm trying to make an ftp transfer from with a cgi script, and
want the ftp client to use my .netrc file. The cgi script is
run by an http daemon owned by me.
If I run the test command:
#perl -e 'system "ftp desthost"'
everything works as expected, and the userid, passwd and ftp commands are
taken from .netrc. However when the command runs from within the cgi
script (under the control of the http daemon and hence no controlling tty),
the ftp command appears to try to run an interactive session, rather than
using the .netrc file, and of course fails.
Any ideas how I can force it to use .netrc? Or alternative means of doing
the ftp? I've tried building the wu-ftp client but it moans about a lack
of termcap.h :( Has anyone built alternative ftp clients on Tru64?
Cheers,
Terry.
^ permalink raw reply [flat|nested] 2+ messages in thread
* ftp-client w/o controlling tty
@ 2005-01-17 16:50 T. Horsnell (tsh)
0 siblings, 0 replies; 2+ messages in thread
From: T. Horsnell (tsh) @ 2005-01-17 16:50 UTC (permalink / raw)
Thanks to Lucio Chiappetti and Rob Leadbeater, I'm in business.
Lucio pointed out that with the -n switch, I could do
#ftp -n somehost < ftpcommandfile
and thus not need the .netrc. This works from my httpd->cgi script.
Rob Leadbeater also suggested the Perl Net::FTP, which I'll try later.
This may be a neater solution that my bunch of perl system calls.
Cheers,
Terry.
>Hi all,
>I'm trying to make an ftp transfer from with a cgi script, and
>want the ftp client to use my .netrc file. The cgi script is
>run by an http daemon owned by me.
>
>If I run the test command:
>
>#perl -e 'system "ftp desthost"'
>
>everything works as expected, and the userid, passwd and ftp commands are
>taken from .netrc. However when the command runs from within the cgi
>script (under the control of the http daemon and hence no controlling tty),
>the ftp command appears to try to run an interactive session, rather than
>using the .netrc file, and of course fails.
>
>Any ideas how I can force it to use .netrc? Or alternative means of doing
>the ftp? I've tried building the wu-ftp client but it moans about a lack
>of termcap.h :( Has anyone built alternative ftp clients on Tru64?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-17 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-17 11:52 ftp-client w/o controlling tty T. Horsnell (tsh)
-- strict thread matches above, loose matches on Subject: below --
2005-01-17 16:50 T. Horsnell (tsh)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox