Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Change File Permissions in DirectAdmin

This guide shows how to change who can read, write or run a file or folder, using the DirectAdmin File Manager.

DirectAdmin2 min read7 steps3 screenshots

What are file permissions?

Permissions are rules on a file. They say who may read it, change it or run it. Think of a school locker. Some people have a key, and some do not.

Permissions are shown as a three-digit number, like 644. The first digit is for the owner, the second for the group, and the third for everyone else. Each digit is made by adding these values:

  • 4 means read.
  • 2 means write (change).
  • 1 means execute (run).

So 6 means read plus write. And 5 means read plus run.

Common safe values

ItemUsual value
Files such as pages and images644
Folders755

Avoid 777. It lets anyone write to the file, which is a security risk.

Steps

Warning: Wrong permissions can make your site show errors, or leave it open to attack. Take a backup first.

  1. Log in to DirectAdmin.
    Screenshot: Log in to DirectAdmin.
  2. Open File Manager.
  3. Go to the folder that holds your file. Your website files are usually inside domains, then your domain name, then public_html.
  4. Click the file or folder to select it.
  5. Click Permissions. In some skins, right-click the file and choose Change Permissions or Chmod.
    Screenshot: Click Permissions . In some skins, right-click the file and choose Change Permissions or C
  6. Tick the boxes for read, write and execute, or type the number, for example 644.
    Screenshot: Tick the boxes for read, write and execute, or type the number, for example 644.
  7. Click Save.

Changing many files

You can select several files with the tick boxes. Then use the same permission option. Do not apply a folder value like 755 to every file in your site. Files and folders need different values.

Tip: If you see a "403 Forbidden" or "500" error after uploading files, check permissions first. Set files to 644 and folders to 755.
Tip: Some apps ask for stricter values on special files. Follow the app's own instructions if they differ.

Quick recap

  • Permissions control who can read, write and run a file.
  • Files are normally 644. Folders are normally 755.
  • Open File Manager, select the item and click Permissions.
  • Never use 777 unless support tells you to.
  • Back up before you change many items.