My web site have several folders which has 777 access permissions, I gave 777 access to those folders because they are use to store images and xml files dynamically through my File upload PHP scripts.

My Web server now flag & say some one tries to hack those folders and trying to execute script through that (Application level hacking). How can I protect those folders, what are the steps I can use to prevent outside hacking. I use those folders to dynamically store files and images.

Web Designing in Sri Lanka