With the default config, cron runs as root, as do the scripts in the
cron.x directories. You could easily change this to another user in
/etc/crontab, but you'll want to add specific lines for makewhatis.cron
and slocate (from cron.daily) if you want to keep them as they need to
run as root (though in the default config makewhatis.cron is a null
script as the only line in it with a command is commented out:). 

I believe it gets the full environment the the user has; i.e. when it
launches the shell, the shell does its normal initialization and sources
the global environment and whatever the user has in his
.profile/.bashrc/.<insert init file here>. The man page isn't too clear
on this point (according to it, the only environment that gets set is
SHELL, LOGNAME, HOME and MAILTO, along with any environment set in the
user's crontab itself), so if someone knows better than me, feel free to
correct me.

-----Original Message-----
From: Andrew Gaffney [mailto:[EMAIL PROTECTED] 
Sent: Sunday, September 21, 2003 9:58 PM
To: Gentoo User
Subject: [gentoo-user] cron environment


I'm currently using vcron with the default config. What user does it 
runs the scripts as? What kind of environment is there (PATH and such)?

-- 
Andrew Gaffney


--
[EMAIL PROTECTED] mailing list

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to