I have a web server,I have many world writeable directories (0777),Created by programmers,for uploading pictures. Now i want to stop script execution (php,cgi,etc) in these directories 0777,I know one way is to use htaccess file,i dont wana used that,if some one know any other method using apache config file or any other methods it will be great.
You shouldn't need 777 permissions. You should have your directories properly owned and grouped in a way that will allow the webserver to write to the directories. World writeable is just bad. So, if the server is running as user 'apache', the files should belong to group 'apache' with r/w/x privileges. The world privilege should be set to r/x at most. Something like this, maybe... drwxrwxr-x adminuser apache 4096 Oct 21 20:52 images_upload Code (markup):