We get this question many times in the tickets. Most of the time, you will want to change file permissions to limit access to it. By default, on most web servers, the public directories have a 755 permission and the files have a 644 permission.
For example, to protect the wp-config.php file it’s recommended in the Hardening WordPress article to set its permissions to 400 or 440. These numbers used in permissions represent:
0 = no permissions 1 = execute only 2 = write only 3 = write and execute (1+2) 4 = read only 5 = read and execute (4+1) 6 = read and write (4+2) 7 = read and write and execute (4+2+1)
Each permission can be controlled at three levels:
u - user/owner - first digit g - group - second digit o - other/public - third digit
In our example, 400 means the owner will have read-only access to it (4), the group and any other users will have no permissions at all(0).
How to change file permissions in DA:
- Log into DA
- Navigate to System Info & Files >> File Manager
- Select the Directory or the File you want to change the permissions for.
- From the top menu select Set Permissions
- Set the desired permissions – Read/Write/Execute for the three access levels Owner/Group/Public – and click the SAVE button.