Next: , Up: Features   [Contents][Index]

5.1 User Group Crontabs

User group crontabs are an experimental feature designed to facilitate maintenance of per-service crontabs. Consider, for example, a web server that runs multiple web sites maintained by various users who need to run periodic backend jobs on behalf of the account the httpd server runs as. User group crontabs make it possible without intervention of the system administrator. Let’s assume httpd runs as the user ‘apache’. The system administrator creates a directory /var/spool/cron/crongroups/apache, and sets ‘apache’ as its owner:

mkdir /var/spool/cron/crongroups/apache
chown apache: /var/spool/cron/crongroups/apache

Then, he adds login names of the users who should be able to edit apache cronjobs to the primary group of the ‘apache’ user. Once done, these users become able to create and edit crontabs in this directory using the crontab command with the -g option (short for ‘group’). For example, the command

crontab -u apache -g -e myproject

edits the file myproject in this directory.

User group crontabs are disabled by default. To enable them, run micrond with the -g group option.