LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   FTP to vsftp (https://www.linuxquestions.org/questions/linux-software-2/ftp-to-vsftp-123006/)

ramick 12-05-2003 01:23 PM

FTP to vsftp
 
I am trying to FTP a file from a Dynix box to a webserver from a cronjob. The webserver is using vsftp.

my crontab is:
0 0-23 * * * /usr/oracle/runit

where /usr/oracle/runit contains:
#!/bin/csh
setenv HOME /usr/oracle
/usr/oracle/create_status
ftp xx.xx.x.x < /usr/oracle/client_status_ftp_web

(The procedure /usr/oracle/create_status just creates the file client_status.out)

where /usr/oracle/client_status_ftp_web contains:
lcd /usr/oracle
put client_status.out
quit

and a correctly formated .netrc file exists in the users home directory (/usr/oracle).

This works from the command line, but not through cron. It also works to other servers running Microsoft FTP Service (Version 5.0) & ProFTPD 1.2.5 Server through cron - what am I missing?

ugob 12-05-2003 01:35 PM

is there an error from cron?

I don't see any authentification... is it an anonymous ftp?

ramick 12-05-2003 01:42 PM

No errors from cron - I logged the output via:
0 0-23 * * * /usr/oracle/runit >> /usr/oracle/runit.log

and I get:
Fri Dec 5 10:01:32 PST 2003
Local directory now /usr/oracle
Not connected.

Authentication is done through .netrc. This file looks like:
machine xx.xx.x.x login ramick password jsdfed

I also tried authenticating by:
ftp -invd xx.xx.x.x 21 << END
user ramick jsdfed

although this won't work with vsftp...at least how this sys admin has it set up.

ugob 12-05-2003 01:46 PM

I'm sorry, this is going further than my knowledge allows me to go :)


All times are GMT -5. The time now is 10:53 PM.