Problem being that if i copy files using a php script they get the owner 99, which i suggest is something like php themselves. This is a pain because now i cannnot delete these files anymore with my ftp program.
How do i get myself out of this mess?
You could have your script chmod() the files to 666 permission.
tried that, even setting them to 0777 doesn't help
Does the script create/own the directory, too? If so, I think it might also need world write permission.
Set the [man]umask/man to 0777 before the PHP script even touches the file (i.e. before any fopen()/copy()/whatever functions).