Setting the Correct File Permissions
This article will explain the importance of setting the correct file permissions on your website files to ensure that your files are protected from being publically overwritten or modified.
There are three groups available for your file types:
-
Owner – the owner of the files
-
Group – other users on the server
-
Public – the general public
Each group will need its own file permissions set on it. The below image is taken from the FTP Client Filezilla – the most commonly used client here at LCN.
In Filezilla you can right click on the particular file/folder that you wish to change the permissions on and then select ‘File Permissions’ or ‘File Attributes’

LCN recommend that your files be set to 755. To achieve this in File Zilla you need to check the following boxes.
Owner: r w x
Group: r -x
Public: r -x
The permission 755 stops public users from writing to the files thus modifying them or compromising them in any way.
You may see permissions described with ‘CHMOD’ as a prefix. This stands for change mode and means ‘to change permissions on a file or folder’
The following table will guide you on what each number of a permission means:
|
Number |
Permission |
Read/Write/Execute |
|
0 |
None |
— |
|
1 |
Execute |
–x |
|
2 |
Write |
-w- |
|
3 |
Write, Execute |
-wx |
|
4 |
Read |
r– |
|
5 |
Read, Execute |
r-x |
|
6 |
Read, Write |
rw- |
|
7 |
Read, Write, Execute |
rwx |
For further information please see the following website:
http://www.interspire.com/content/articles/12/1/FTP-and-Understanding-File-Permissions
Please feel free to leave any comments below.
