How to change file permissions in DirectAdmin

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:

  1. Log into DA
  2. Navigate to System Info & Files >> File Manager 
  3. Select the Directory or the File you want to change the permissions for.
  4. From the top menu select Set Permissions
  5. Set the desired permissions – Read/Write/Execute for the three access levels Owner/Group/Public – and click the SAVE button.
directadmin file permissions
DirectAdmin Directory/File Permissions

DirectAdmin File Manager
Linux Access Permissions

Leave a Reply