Chuck, I'm getting similar errors on rebuilding medium images, after moving my functioning photopost to a new server.
Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/xxxxx/public_html/photo/data/512/medium/1stoneforest__22_.JPG' for writing: Permission denied in /home/xxxxxx/public_html/photo/image-inc.php on line 159
Everything is chmod'ed 777 in the data directory, even the 1, 2, 5xx directories, and all of their individual directories in each of those folders (that took some time). Any idea why I continue to get these errors? Photopost seems to be working fine other than that.