class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
You will probably need to solve this issue with your hosting company. Generally, on shared hosting, the web server user is the same as your FTP user, and you don't have the problem you describe.
That said, you can change the default chmod mode with the class:
That said, you can change the default chmod mode with the class: