There are a variety of maintenance routines that people can run in OS X, including the disk verification and permissions repair that come with the system, along with scripts such as cache cleaners that are available in third-party utilities. These scripts can be quite useful, but also can give odd-looking output that may concern people and cause them to try extra measures to fix problems, which can lead to unexpected errors.
Apple Discussion poster "nomulous" writes:
"I was having way to many 'ACL found but not expected' errors when I repaired my permissions, so I decided to use the 'reset ACL' feature from the Leopard Install DVD's Password Reset application. When I booted from my computer again, lots of stuff was crashing, and none of my third-party preference panes showed up because for some reason I couldn't read from my computer's '/Library' folder. When I checked the permissions, they looked fine, Read & Write for 'system', and Read only for 'everyone'. But even still, it had the little red '-' sign on the folder and I couldn't open it at all."
These maintenance scripts are available mainly for troubleshooting purposes, and while it's a good idea to run them on a periodic basis, do not jump the gun and take extensive corrective action in the event of an error or warning, because unless you know what you are doing you may harm an otherwise perfectly healthy OS installation. Many times just running the maintenance routines and dismissing warnings is the best route, but there are some recommended time intervals and instances for running these routines.
Apple includes a library containing each file's default permissions, and the system checks files against this library when you run a verification with Disk Utility or through the command line. As such, permissions fixes only ensure that system files and folders are properly accessible the way they were with respect to the reference system used to create the library.
Periodically running a permissions fix or verification will not hurt anything in most cases, but the only time it is important is when applications or the system start acting strangely or missing features or cannot load items such as configuration files. For instance, if you are running System Preferences and are unable to load a certain preference pane, there could be a fault in the permissions for that pane which prevents access to it by the current user, and a permissions fix may help.
The most common form of permissions errors are something like "user should be 0, but is 501" or some other user/group-related number change for a file, and there might be read/write/execute differences such as "should be -rwxrwxr-x, but they are -rw-rw-r--" for a given file. Running a fix on these problems should clear them up, but if they do not go away there should be no need for worry unless the system is behaving oddly, and particlularly if the mentioned file is part of an applicaiton or system feature that you cannot access.
Beyond these problems, there may be persistent warnings you may see when fixing permissions, that do not go away after running a fix routine. The most common of these errors are "Warning: SUID file has been modified and will not be repaired" and "ACL found but not expected", which may sound serious but are just informing you of a minor discrepancy and can be dismissed.
In OS X, permissions can be set up a variety of ways for various files while still keeping them properly accessible, because there are many attributes that do not apply to all files but can still be set for them. This gives a situation where Disk Utility will flag a difference from the permissions library even though fixing the difference will not change how the file is handled or accessed. The permissions library contains just one permissions configuration that works, but a variety of others will work as well even though Disk Utility will flag it as an error. For instance, Disk Utility might output the following:
In this message, the system is claiming the image file "IanArrow.png" should be tagged as "executable" (the "x" in the permissions string) for all users and groups. In reality, it does not matter if an image file is executable because it does not contain any binary or script information to run. Therefore, it does not matter if this attribute is enabled or disabled for this image to be accessed and for "AirPort Utility" to run normally. The only reason Disk Utility is outputting this warning is that when the permissions library was created at Apple, for some reason the file was flagged as "executable", perhaps because Apple flagged the whole "AirPort Utility.app" package and all included items to be executable. Changing this attribute for the image file will not affect a thing (except prevent Disk Utility from displaying the warning).
You cannot harm your system by running permissions fixes and dismissing persistent warning messages such as those mentioned, but they are probably only needed as regular maintenance every month or two at the most. We recommend you run permissions fixes both before and after applying system updates, and especially if you have manually modified system files or files within some of Apple's applications. The only time you should not automatically run a permissions fix is if you are a server administrator who has heavily modified system permissions for network access or some other customized application.
Keep in mind that the permissions library only contains information for Apple-related products (the OS, and some Apple programs), and therefore will not track any files or folders you have created, or any non-Apple applications you may have installed.
Many people use external hard drives which they mount and unmount repeatedly throughout the day. Although rare, this increases the probability of filesystem corruption which can usually be addressed by running a disk verification and repair routine with Disk Utility. This is only required if a drive is behaving oddly such as mounting or unmounting slowly, or if transfer speeds are uncharacteristically low; however, sometimes there can be problems with the drive's index files that can go unnoticed. Scheduling a repair will depend on how often the disk is used, but doing it every week to every month is a good practice for most uses.
Unlike permissions fixes, if the disk verification process gives any errors, take them seriously and try a repair or take the computer in for servicing to ensure the disk is ok. Disks should pass verification routines every time without any errors or warnings.
Many programs and system processes cache commonly used information, which can initially speed up the system, but in the long run can cause slow-downs if cached information is either corrupted or has become so large that it takes extra time to sort through. If the system gets bogged down and takes longer to boot and load applications that used to run fast, many times running a cache cleaning program will fix the problem.
There are a variety out there, including "Leopard Cache Cleaner", "MacCleanse", and "OnyX", which are good to get in the habit of running every month or two. Running these programs too often may remove otherwise healthy caches and cause the system to keep having to rebuild them, but refreshing the caches every few months or when slowdowns occur will not hurt anything. There are a variety of cache cleaning and other system maintenance tools which we cover in our Weekly Utilities Updates postings.
UPDATE: Last minute title change typo fixed. :)Resources