the server has a strange setup, thats right, but I cant change it. Its not a problem anymore. I found the place in the script where the medsize file is generated and I insert a chmod right after it.
I do the same thing for the thumbs a while ago but miss the medsize
I also have tho insert chmods for generating index.htm and uploadhandling. Seems to work right now.