On some systems you'll get some error info if you go to the following URL while logged in as an admin:
ubbthreads.php?ubb=captcha&type=im&test=1
The only permissions that matter to the captcha images would be the cache directory as that's where it writes the temporary image.