Most of the time I've had these errors, it was due to the tmp directory's permissions being set incorrectly. However, there was another situation I had recently that was hard to track down, but fairly simple to fix.
If you run cake shells from the command line as yourself, this will set permissions which are probably incompatible with apache, so you need to make sure you either run the shell as the apache user, or clear out any tmp files when you're done running your shells. This is particularly frustrating because everything can be running along fine with no errors logging, then you login to do something simple (at least you think its simple), and you come back a week later and now the log file is filled up. It was fine originally because all the files were from apache. Then you got in there and touched some files (just by running the shell), and now the files have different perms.
Another related situation is if you run any cake shells via a cron job, the cron job must also use the same user:group as your apache server so that any files created by the shell have permissions compatible with apache. I had originally been running the cron as root (which is typical), so the cache files it created had root:root, and then when apache tried to access those files, it would throw a perms error.