Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use cron to repair permissions on a regular basis' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use cron to repair permissions on a regular basis
Authored by: hocevar on Nov 20, '04 01:26:38AM

Great hint for those like me that manually ran Disk Utility.

However, is it necessary to set the two vars and export PATH?
I seemed to have run it without OK (since my default tcsh choked
on them, since then changed script to sh)
And what purpose do they serve? I see that the other replies just show
running diskutil alone in script.



[ Reply to This | # ]
Use cron to repair permissions on a regular basis
Authored by: adrianm on Nov 20, '04 03:08:04AM
You are right, it is not necessary. Nor is the host= line. Looks like a bit of "copy/paste without really understanding what you're doing" from the author - a bit dangerous for someone providing a hint involving changing root-owned files/directories....

As the only useful command in there is diskutil, it would probably better simply to express the script:


echo "Repairing Permissions
/usr/sbin/diskutil repairPermissions /


[ Reply to This | # ]
Use cron to repair permissions on a regular basis
Authored by: Shawn Parr on Nov 20, '04 09:01:34PM

I was not aware that this would work without adding the path, however in many *nix systems if you do not do this then diskutil will not be able to be found.

For instance on many linux systems making a script like this without declaring the path would give you a non-functioning script.

I also kept the host declaration in as it is possible that some apps, including diskutil may require it, and depending on how the system sets up its environment variables you may have to declare it per script much like the PATH reason above.

In SuSE there is an rc.common that the startup scripts can call that includes most of this information. I didn't see such a script for OS X.



[ Reply to This | # ]