HOWTO: Protect chmod 777 folders

Sometimes linux hosting users need to change the permissions on a folder to use upload scripts or other applications that need this permissions.

With chmod 777 their folder gain the rights: writing / reading and execute for everyone. Malicious hackers like these kind of folders.

php_snow.gifHow can you protect that folders?
You can turn PHP off on that folder and disable php / html / perl files.

How can it be done?
Create this .htaccess in the folder:

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

Thats it, you just increased the security level on this folders.

Stumble It
Add to Del.icio.us

Did you like this post?

Digging and sharing is a great way to say thanks!

Leave a Reply

© 2008 twinturbo.org. All Rights Reserved.
30 queries. 1.143 seconds. | ¯\(°_o)/¯
Word to our gui, os, http server, database, and scripting language. lamp-for-life.