We use a Unix-like file storage system for all our website hosting services. This means traditional Unix permissions are applied to all files uploaded to our servers.
File permissions tell the server which users can read, write or execute a file or folder. Leaving a file or folder set to an insecure permission such as 777 can be vary dangerous.
Changing file permissions using File Manager (cPanel hosting)
- Login to your Account level console using the Master Account Reference and Password.
- Locate Administer/Upgrade domain along the left hand side of the page.
- Search for or select the domain to which the hosting applies.
- Click [Administer].
- Click cPanel.
- Click [Manage Account (opens a new window)].
- Click File Manager and select the directory to open and click [Go].
- Right-click the file/folder that you need to update the permissions and click Change Permissions on the resulting pop-up menu.
Changing file permissions using FileZilla
FileZilla is a free FTP client used to upload/download and manage website files.
- Connect to the FTP server.
- Right click on the files/folders you wish to update the permissions to
- Select File Permissions from the drop down menu
- Select the appropriate boxes or type in the Numeric Value of your new permission
- Click [OK]
If you use an alternative FTP client, please see it’s documentation on how to modify file permissions.
Types of permissions
Files:
- Read – The file can be read
- Write – The user or process can write to and change the file
- Execute – The file can be executed or run
Directories:
- Read – The directory listing can be obtained.
- Write – The directories contents can be written to. New files can be created or existing files deleted.
- Execute – The directory can be accessed.
Who has these permissions
Unix-like file permissions are made up of a group of 3 numbers known as an octal representation, e.g. 644. This number represents three types of permissions that must be granted to a given file: Owner, Group, Others.
- Owner – specifies the individual owner of a given file or directory.
- Group – specifies a defined group to whom permissions may be granted as a collective, and only those members of that group.
- Others – specifies that permission may be granted to anybody attempting to access it.
File Permission Values
The following values are used for Owners, Groups and Others to form permission.
Value |
Description | Permissions |
0 | no access | — |
1 | execute | –x |
2 | write | -w- |
3 | write and execute | w-x |
4 | read | r– |
5 | read and execute | r-x |
6 | read and write | r-w |
7 | read, write and execute (full access) | rwx |
Common file permissions
Value |
Description | Information |
644 r-wr–r– |
6 – Owner has read and write permissions 4 – Group has only read permissions 4 – Others have only read permissions |
Allows only the owner to make changes to the file or directory. |
755 rwxr-xr-x |
7 – Owner has read, write, and execute 5 – Group has read and execute permissions 5 – Others have read and execute permissions |
Required to install some scripts or to browse to a required directory. |
777 rwxrwxrwx |
7 – Owner has read, write, and execute permissions 5 – Group has read, write, and execute permissions 5 – Others have read, write, and execute permissions |
Should never be used, as anyone can modify these files at any time. |
Note: 777 file permissions allow for anybody to read, write, or execute the file, and as such, expose the file to potential malicious threats. Always change file permissions to restrict access.
every single file and folder stored on the hard drive has a set of permissions associated with it, which says who is allowed to do what with the file. Every file (and folder) also has an “owner” and a “group” associated with it. If you created the file, then you are usually the owner of that file, and your group, or the group associated with the folder you created the file in, will usually be associated with that file