Folks,

I am trying to help a non-technical user behind a corporate firewall to reliably send files via FTP.

I have Net::FTP doing sleep/retry for transient errors fine here, but we are not behind an FTP proxy. I have a copy of a working transfer from them, from which I can infer that they have a FirewallType of 4. However they do not have Net::Config properly configured - corporate standards et al.

I cannot find a way to tell Net::FTP the fwuser and fwpass except via the Net::Config files. Having looked at the Net::FTP source, am I correct in assuming therefore that there is no Net::FTP interface for passing these values as args anywhere? Does this mean that I will have to use something like:

logDebug "opening connection to $arg{firewall}..."; my $ftp = Net::FTP->new( $arg{firewall}, Debug => $DEBUG ) or logError "failed connection: $arg{firewall}: $@" and return 0; logDebug "logging into $arg{firewall} as $arg{fwuser}..."; $ftp->login($arg{fwuser},$arg{fwpass}) or logError "failed login: $arg{fwuser}\@$arg{firewall} " . $ftp-> +message() and return 0; logDebug "connecting to $arg{host}..."; $ftp->quot('OPEN',$arg{host}) or logError "failed OPEN: $arg{host} " . $ftp->message() and return 0; logDebug "logging in on $arg{host}..."; $ftp->login($arg{user},$arg{password}) or logError "failed login: $arg{user}\@$arg{host} " . $ftp->messag +e() and return 0;

Apologies for having to ask this, but I don't have a test environment, and the non-techie user is, well, rather non-technical, and in another country/timezone.

Regards & thanks,
Jeff


In reply to Net::FTP firewall fwuser fwpass by jaa

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.