Protecting 777 folders using .htaccess

Some time you need to change permission of a particular folder to 777 so that user can upload scripts/images or any application they are using on that folder.  Once you set 777 permission for any folder, then that folder can be read, write and execute by anyone accessing it. Its most favorite folder type for Hackers, they always search for any folder having such permission so that they can easily get into your server hosting account. Once they get any folder having write/execute permission then their work gets easier and they can upload their dirty scripts to get into your server, hosting account.
468 x 60 a Protecting 777 folders using .htaccess You should protect such folder having this special permission, you can do so by turning PHP off for that folder and disable php / html / perl files using .htaccess file. You need to create .htaccess file with following code in it for the folder which is having 777 permission.
php_flag engine off

777permision Protecting 777 folders using .htaccess

Using .htaccess file having above code you can secure folder with read, write, execute permission and thus can protect your hosting account.

Posted under Technology Updates

This post was written by admin on November 4, 2008

Tags: , ,