Recommended file and folder permissions
In Linux file systems, all stored files and folders are assigned traditional Unix permissions; these tell the server which users and groups can read, write and execute each individual item. Setting these appropriately is key to ensure data remains secure.
Typical Permission Sets
Typically files within a /public_html directory should be set to 644 and folders 755 under the VentraIP cPanel hosting environment; the typical exception to this is configuration files (such as wp-config.php) where consideration should be made to set those to a lower value such as 400 to prevent unauthorised reading and writing of the file.
These permissions may be set through file manager in cPanel, FTP Software or SSH (Advanced Users). For information on setting file and folder permissions please see the article How do I set permissions on files and folders?.
Common Permission Types
400 :: r------
- 4 – Owner has read permissions;
- 0 – Group has no permissions;
- 0 – Others have no permissions.
Information: Allows only the owner to read the file or folder.
644 :: r-wr–r–
- 6 – Owner has read and write permissions;
- 4 – Group has only read permissions;
- 4 – Others have only read permissions.
Information: 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.
Information: 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.
Information: Should never be used, as anyone can modify these files at any time. This permission value will typically fail in our hosting environment and is not recommended
If you think you’ve made a mistake with permissions then you can use our Permissions Fixer in VIPControl.
This will set all file permissions under the public_html folder to 644 and all folder permissions under the public_html folder to be 755. It can be found in VIPControl >> Shared Hosting >> Manage >> Click on the hosting you want to fix the permissions on >> Permissions Fixer.