1. Always make sure your folders are given 755 permissions (with index file in it) OR 711 permissions. 711 gives Access denied error.

2. Most of the cgi scripts that run under your cgi-bin needs to be chmoded 755 to make them world executable.

3. Some cgi/php scripts need to chmod 777 for the folders. This is because the server needs permission to write on your files. For example you have a membership form where your visitor fills the form. When the form is submitted by the user, the script process the data and writes the user info to your database files. So in this case you have to keep 777 permissions to some script folders.

Here is the tricky part … On some servers scripts run under USER ID. Means they can be writable under user account. In this case there is no need to chmod folders/files to 777. It is a good thing. If you don’t know your server API, ask your host this question – “Is my server API is Apache or CGI Binary?”. If your host tells it is CGI Binary, then your scripts run under your user id.

4. Here is a little script to make you understand better about file permissions:

r means Read.
w means Write.
x means Execute.

Owner means YOU.
Group means that the owner belongs to.
Other means all others.

As a owner you need to read, write and execute the files.
As a group certain web server applications or people need to read and execute your files.
As ‘others’, the whole world needs to read and execute your files.

Most common file permissions:

Files: 644
Folders: 755
Images: 644
CGI scripts: 755
Php scripts: 644

Sometimes you need to chmod the folders or files to 777 to make them writable by the ‘Others’ though this is not advised.

Here is a web site that explains the permissions:
http://www.zzee.com/solutions/unix-permissions.shtml

 

 

Web site Protection Tips:

* Step One: Protect folders by robots.txt – Stop search engine robots indexing Your private folders by ‘robots.txt’.
* Step Two: Protect folders by index file – Protect folders – Keep an INDEX file.
* Step Three: Protect folders by permissions – Folder protection – Directory and script file permissions.
* Step Four: Protect Your email addresses – Protect email address links – Stop email robots to get your email address.
* Step Five: Protect your downloads – Protect your downloads by password folder protection.
* Step Six: Protect your affiliate links – Affiliate link cloacking – Protect or hide your affiliate links.
* Step Seven: Protect Images – Image protection – Stop image hotlinking.

Author: Radhika (c)
http://www.webmasters-central.com/




Related Posts

  • No Related Posts Found