Correct file permissions for your web site
There is a lot of confusion between rookie web developers about file permissions…
Here is a short list about file permissions in general and some reasons why they are supposed to be set this way.
Your website will have a directory on the server where all your files will reside in. It is usually called public_html in case of a Linux based host. Permissions for this directory is normally set to 711.
There are a few folders that might have been created for you within the home directory, such as the cgi-bin which could be hosting all SSI (CGI,PERL) scripts. Like for all directories the permission is recommended to be set to 755. Files within however should be set to 700. This stands for all PERL and CGI scripts as well.
The notorious trouble makers, the htaccess files should be set to 644like all other html, shtml, etc files of your web site.
Most web masters do not recommend the use of htaccess files and on some servers they are not even enabled. However, if you are using them and have acces to them, it is good practice to prevent others from viewing them by placing the following code into your main htaccess file.
<Files .htaccess> order allow,deny deny from all </Files>
![]() | OpenSUSE 11.0 and SUSE Linux Enterprise Server Bible Presenting updated coverage of openSUSE 11. 0 and SUSE Linux Enterprise Server 11…. |


