Protect (Secure) 777 CHMOD folders using .htaccess

Protect (Secure) 777 CHMOD 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 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 website. Common problems can be from uploading Phishing sites. These are clones of bank, ebay, Paypal and other sites to try and steal usernames and passwords.

You should protect 777 folders 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

<Files ~ “.(php*|s?p?html|cgi|pl|txt)$”>
deny from all
</Files>

 

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



Leave a Reply

© Copyright Sellopolis (Formerly Prozilla Turnkey Websites) 2002-2011. All rights reserved. | Original Theme by Elegant Themes. Modified by Sellopolis
Calgary Painters | Airdrie Painters | Calgary Corporate Catering