Hi.
Perhaps, u could try to set your parent directory permission to 'write-enabled'.
such as:
This allow your script to be able to write the file into it. But that means anyone can write / delete that directory... : O }
Anyway, it works on my webserver's photoalbum where user can upload their own photos.
hmm... hope that helps.
cheers.