Proteksi folder chmod 777 dengan htaccess

by Herman Tarigan on April 1, 2008

Folder dengan chmod 777 = bisa di tulis, baca dan di eksekusi oleh “siapa saja”

Biasanya kelemahan ini dianggap sepele (terabaikan begitu saja), padahal ini bisa berakibat fatal dari sisi sekuriti web, terutama pada folder upload/images. Sebaiknya jika menngunakan fasilitas upload untuk umum seperti upload file, image avatar, image profile, dll. Folder tujuan sebaiknya difilter, diantaranya menggunakan file htaccess. Berikut sedikit tips yang mungkin bisa membatasi akses ke folder tersebut :

Create file .htaccess di folder yang bersangkutan dan isi dengan :

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

Penjelasan :
.htaccess diatas akan menolak (Deny) akses ke folder tersebut terhadap extensi file php,shtml,phtml,cgi,pl

Catatan :
Anda bisa menambah,modif FIle yang diinginkan/ditolak sesuai dengan kebutuhan

Herman Tarigan

Pernah menjadi Operator warnet, Customer Service Webhosting, System Administrator Webhosting, Website (SEO) Consultant, Operational Manager, Marketing dan sekarang memilih menjadi FREELANCE :)

Incoming search terms for the article:

chmod 777, arti chmod 777, pengertian chmod, arti CHMOD, pengertian chmod 777
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • LinkedIn
  • Live
  • Print this article!
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb

{ 2 comments… read them below or add one }

kLepto January 21, 2012 at 2:33 am

wah bermanfaat sekali, langsung coba gan…

Reply

kLepto January 21, 2012 at 2:40 am

kok malah web nya g bisa di akses y gan?

Reply

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word