Sunday, January 29, 2017

What user do scripts in the cron folders run as? (i.e. cron.daily, cron.hourly, etc)




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?


Answer



They all run as root. If you need otherwise, use su 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).


No comments:

Post a Comment