Back to search

How to Protect your Images and TMP Directories.


Most websites require their images and tmp directories to have Full Write Access. This is in order to store files that are generated by the website itself.

Occasionally there are vulnerabilities in the website's own code. These vulnerabilities can allow a 'hacker' to upload their PHP, or Perl scripts into the affected directories. These files are designed to exploit the website, e.g. to send out massive email spamming campaigns.

TO AVOID THIS:
Create an .htaccess file with the following content and save it in each of the directories that you wish to secure.


<files "*.php"="">
Deny from all
</files>

<files "*.pl"="">
Deny from all
</files>

Allow from all
Was this answer helpful?      

Also Read

How to create a POP email account in cPanel
This demo assumes you've already logged in to cPanel. Now let's create a new POP email account....
Deleting tables from a database with phpMyAdmin
This tutorial assumes you've already logged in to phpMyAdmin Now let's learn how to delete a...
How to install Nucleus from Softaculous
Let's see how to install Nucleus from Softaculous. 1 Find Nucleus in the list. You will be...
How to upgrade a script installed by Sofaculous
It's recommended to keep your scripts updated as new versions may fix security risks and other...