Re: [SLUG] Really an Odd One,,

From: Kwan Lowe (kwan@digitalhermit.com)
Date: Fri Oct 24 2003 - 10:37:43 EDT


> I have a shell script program that when I run it as root the program
> works flawlessly. So, I put it in cron to run every hour. When cron
> runs the program it appears to screw up a simple cp command and the
> results are not what I expect.
>
> What ends up being copied is not what is in the file to be copied, but
> rather it seems to copy a file that is a part of the finished file. If
> that makes sense. I manipulate data until it is in the form that I want
> and then copy the finished data file to another directory for use.
>
> Run from a command line as root, the programs works just fine.
>
> I chmod'd the files to go+w so everyone could write and then even
> chgrp'd to uucp.
>
> I have a feeling that somehow when cron executes it lacks some of the
> ability of root when running programs.

A common mistake is to not set the PATH variable or use the fully
qualified name of the executable in a cron script. Can you post the
script?

-- 
The Digital Hermit      Unix and Linux Solutions
http://www.digitalhermit.com
kwan@digitalhermit.com
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:07:01 EDT