What should I set the folder permission for the image upload folder? Users should be able to upload their images but not execute code. I have always used 777 and once someone uploaded a php script and got into my server... I just put a filter there for the file not to contain ".php", but I think the execution thing would work much better...