advertisement

Article:
  Learning the Mac OS X Terminal, Part 5
Subject:   Cronning for non 24 hour computers: Addendum on permissions
Date:   2002-07-03 13:55:24
From:   kwidholm
Response to: Cronning for non 24 hour computers

If you want to use the above script for the maintenance tasks, you'll need to be sure that the user running the script has permission to run the daily, weekly, monthly scripts as well as permission to output to the log directory. I have set up a separate admin user on my machine, and granted rights only to this user to these files. The /var/log directory is owned by admin, and in general I've let admin take over many of the tasks normally performed by root, in order to minimize the amount of processes someone could hijack.


Alternatively, for system-wide administration, run XJanitor.pl from the system cron, and for personal ones, run a different copy of XJanitor.pl, with different parameters set to run scripts and output that require no administrative privileges (as in the backing up example above). Each user could have his or her own copy of XJanitor.pl in her ~/Library/Scripts folder, for example.