Managing cache-related errors in OS X

OS X outputs many warnings and errors that can be seen in the Console application. Some users have found errors involving the ability to create, access, or update caches; here are some approaches for dealing with these errors.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
2 min read

Every now and then people write in regarding various errors they see in the system console, where you can review system messages and troubleshoot problems. Sometimes these errors may be related to problems in which the system cannot build or access a specific cache, which can be an application cache, or a system cache such as the kernel extension "kext" cache.

Usually, when caching problems happen, the system will not show any signs of malfunction. Caches are generally binary databases of commonly accessed files that make items easier to load, and if one is missing then the system will just resort to dealing with the raw files on disk instead of the cache. At most this will result in items taking a little longer to load, but many times the difference will be negligible.

The creation of various caches in OS X either by programs or the system may require special permissions settings for the places they are stored, so if you see cache-related errors pop up in the console or system logs then you can likely fix them by doing basic permissions-fix routines on the boot drive.

The first is to launch Disk Utility and use its Repair Disk Permissions option to ensure that system files have the proper ownership and read/write access so the system can properly store files (including caches). This routine should be run when you boot from the internal boot drive, and using the Disk Utility version that is installed with your system.

The second routine is to fix the permissions in your home folder, since many application caches are stored in your user library. There are two approaches to doing this. The quick way is to launch the Terminal and then run the following two commands:

sudo chown -R `id -un` ~/Library

sudo chmod -R 700 ~/Library

These commands will recursively ensure that all files and folders in your user library are owned by you, and that the owner has full read/write permissions for all of these files and folders.

While this should allow the Library folder contents to be properly accessible, the preferred way to change home-folder permissions is to boot using the OS X installation DVD and then, after selecting your language in the installer, choose "Reset Password" from the Utilities menu. From here, select your user account and choose the option to reset permissions in the home directory, which will make sure that all files in your home directory are properly accessible by you.

The last option you might consider is to run a general maintenance routine on your system, making sure to completely clear all system and user caches when doing so. This will force the system to delete and rebuild the current caches, which may have errors that could be the root of the problems.

Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.