Nov 19, '04 09:51:00AM • Contributed by: Shawn Parr
sudo pico /etc/weekly.local
This uses the pico text editor to create a weekly.local file (feel free to substitute your favorite *nix text editor). This file is looked for by the /etc/weekly script, and run as part of that task if it exists. Then in the file, put something like the following:
# Begin Repair Permissions Script
PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/libexec
export PATH
host=`hostname -s`
echo "Repairing Permissions on System Drive"
diskutil repairPermissions disk0s3
# End Repair Permissions Script
If you have changed your partitions and/or disk setup since you first received your machine, type the following in the Terminal to find out what your boot partition is called: diskutil list.
Finally, make the script executable, I suggest the following:
sudo chmod 555 weekly.local
These instructions, plus a better way to do it for OS X Server are available on my blog. If you are someone who turns your machine off at night, this hint, combined with Mac Janitor can take care of both normal cron maintenance and repairing permissions all at once.
