Re: FTP: 421 Service not available....

On Mon, 18 Jun 2007, in the Usenet newsgroup comp.os.linux.networking, in
article <1182189289.228555.125450@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, erick-flores

Here is whats happening and its getting more confused:
This ftp process runs from a crontab. It runs every day (mon-fri) @
19:30. When it runs it fails. But then when i run (the exact same
script) manually @ 8.35 every morning it runs just fine.

Do you know if the DGSUX ftp server has any access time limitations?

Can be something wrong in the crontab then?

Most certainly yes. The environment in cron is SUBSTANTIALLY less than
in your shell. Use the command 'set' to see the difference. As a user
on this system, I see

[compton ~]$ set | wc -l
[compton ~]$

41 lines of settings. As root, it's 44. In a cron task, it's only 20
lines, and those "missing" lines constantly trap individuals. Another
common problem is the PATH - in cron, it's usually quite restricted
(perhaps only "/sbin:/bin:/usr/sbin:/usr/bin" - notice the lack of
"local" directories). Finally, though I'm not sure it's a problem,
cron doesn't "own" a terminal, so you may run into problems with where
'stdout' is going.

this is how my crontab looks like:
30 19 * * 1-5 /usr/local/bin/x.autoextract # Extract orders

"/usr/local/bin" - this will _run_ OK, as long as _if_ it is calling
stuff that isn't in PATH, it calls it with a full pathname as you've
done in this crontab entry.

Second question - which crontab is this (system, or user?) and which
cron daemon in this. Neither here or in your original post do you
identify the Linux distribution and release. For a _system_ crontab
(/etc/crontab) entry using 'vixie-cron' (the most common cron daemon),
there should be a variable between 'day-of-week' and 'command' that
identifies the user to run this job as. If this is an individual user's
crontab, OR if you are using 'dillon-cron' (found in Slackware and
clones), the username field should not be included (the way you show
this entry).

Note that neither 'vixie-cron' or 'dillon-cron' allow comments on
the individual command line - they are passed to the shell as if they
are part of the command, and that may not be what you desire.

Old guy