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.
OK, here is an expertise question for 10 points: I know this upload class uses automatic file permission change and then upload, but the thing is our server does not allow PHP chmod function (I don't know how). To change file permissions you have to connect with FTP. It's OK, because I can use ftp functions in PHP to connect, change file permission to 777, upload files, then change file permissions back to 755. But newly created (by class.upload) directories' owner is not the same user that I connect to server, so, I can NOT chmod new directories to 755.
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:
Any solutions?
That said, you can change the default chmod mode with the class:
But I solved my own problem anyway, instead of letting class.upload to create new directories, I rewrote it, so the FTP connection creates them.
Thank you for your quick reply.
Si posteas tu solución te lo agradecería, yo tengo el mismo problema.