if i understand correctly
0- move current upload directory to make room for a new upload directory to be created by the php script
1- change the file permissions of the parent directory of the upload directory to 777
2- php script creates new upload directory and sets permissions to 777 so it can upload the images
3- can sudo be used on windows server? also, putting the images there myself defeats the purpose
4- php script finishes uploading images and changes file permission of upload directory back to 755
seems like that still leaves the parent directory of the upload folder wide open to the world ...?