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?
Cron – What user do scripts in the cron folders run as? (i.e. cron.daily, cron.hourly, etc)
cron
cron
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?
Best Answer
They all run as
root
. If you need otherwise, usesu
in the script or add a crontab entry to the user's crontab (man crontab
) or the system-wide crontab (whose location I couldn't tell you on CentOS).