On 12/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On 26/12/06 17:28:18, Ag. Hatzimanikas wrote:
> > On Tue, Dec 26, at 11:26 [EMAIL PROTECTED] wrote:
> > >
> > > I'm  failing  at  figuring   out how to set $PATH for fcron jobs. I want 
> > > to be
> > > able to start scripts that depend on a modified $PATH.  If  I'm  not  
> > > mistaken
> > > fcron  runs  as  the  special  user  fcron  and then changes to the user 
> > > it is

<snip>

>
> Ah,  thanks. I thought I'd have to get login set the PATH. Still I'm wondering
> where the default PATH is coming from before any  bash_profile  or  bashrc  is
> read. Some where I read it would be compiled in, just didn't say where.
> Sorry for the wrong list, as I was lead to login I decided to take lfs.

I'm not sure specifically about fcron, since I don't have the source
handy, but most cron implementations *deliberately* reset the
executing environment to null for security reasons - that way any
nefarious individual cannot modify the default system path and cause a
cron job to execute an unexpected action because it's environment has
changed.

Just manually setup your environment for each script, or better yet,
never assume a command location and always hardcode the full path -
that way if something moves, you do an upgrade, etc, the script will
break rather than silently choose a new binary you weren't expecting
it to.

Also, the default setting of the path is set by either login (part of
shadow, and thus using \etc\login.def to define the default PATH) or
sshd (for remote logins only)

-- 
-- -
Steve Crosby
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to