If I put a script in /etc/cron.daily on CentOS what user will it run as? Do they all run as root or as the owner?
|
They all run as |
|||
|
|
|
Edit: my answer doesn't actually apply in this case, see Zoredache's comment below. Sorry, all (esp. geekosaur). Kyle, note that if you want to run a script regularly as a non-root user, the following may be helpful; just do it through cron.d rather than cron.{hourly,daily,weekly,monthly}. I hate to contradict, but I fear that geekosaur isn't quite right. They run as root except where specified otherwise. Here's part of my CentOS box's
Note how, on the substantive line (line 3), there's a username specified before the executable. This particular cron entry runs as user munin, so provided your cron is similar to CentOS 5's (vixie-cron-4.1-77), you should be able to do likewise. |
|||||||||||
|