ftp-client w/o controlling tty

From: T. Horsnell (tsh) (tsh_at_mrc-lmb.cam.ac.uk)
Date: 01/17/05

  • Next message: T. Horsnell (tsh): "ftp-client w/o controlling tty"
    Date: Mon, 17 Jan 2005 11:52:17 +0000 (GMT)
    To: Managers <tru64-unix-managers@ornl.gov>
    
    

    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.


  • Next message: T. Horsnell (tsh): "ftp-client w/o controlling tty"

    Relevant Pages

    • SYSCONF and FTPIT jobs
      ... Before I start hacking at the FTPIT job I ... The target host is SELinux enabled and uses vsftpd as the ftp daemon. ... it seems to me that the info in the netrc file is not being used or is ...
      (comp.sys.hp.mpe)
    • Re: need help
      ... You can also do this by automating an ftp transfer. ... create a .netrc file on the source system. ... automate ftp. ... mput /mydir/subdir1/* ...
      (comp.unix.aix)
    • Re: .netrc permission denied AIX 4.3.3
      ... > I'm trying to set up an automated ftp process, this is the .netrc file. ... > This is the response I get when I try to run an ftp to the machine webtest. ...
      (comp.unix.aix)
    • Re: Automatic Login using ftp
      ... > netrc - file for ftp remote login data ... > The .netrc file contains data for logging in to a remote ... Error - .netrc file not correct mode. ... plus i mentioned ftp -n remotemachinename (rather i shouldn't have ...
      (comp.unix.shell)
    • FTP via .netrc
      ... I am using .netrc file to achieve my purpose. ... and kill the child process after 5 seconds. ... the problem is the bash get killed and ftp service keeps on. ...
      (comp.os.linux.misc)