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

How to change file permissions in cPanel

This guide shows you how to change who can read, write or run a file. You do it in File Manager.

cPanel2 min read10 steps4 screenshots

What are file permissions?

Permissions are rules on each file and folder. They say who may do what. Think of a school locker. Some people can look inside. Fewer can change things.

There are three actions:

  • Read: look at the file.
  • Write: change the file.
  • Execute: run the file as a program.

There are three groups of people: the owner (you), the group, and world (everyone else).

What do the numbers mean?

Each action has a number. Read is 4. Write is 2. Execute is 1. Add them up for each group.

NumberMeaning
7Read, write and run
6Read and write
5Read and run
4Read only

A permission like 644 has three digits. They are for owner, group and world. So 644 means the owner can read and write. Everyone else can only read.

Common safe values

  • Files: 644
  • Folders: 755
  • Secret config files: 600 or 640, if the app allows it

Warning: Never use 777. It lets anyone write to the file. It is a common cause of hacked sites. Many servers will also show an error for it.

Steps

  1. Log in to cPanel.
    technical support
  2. Click File Manager.
    file manager
  3. Go to the file or folder you want to change.
  4. Right-click it and choose Change Permissions. You can also select it and click Permissions in the top bar.
    change permissions
  5. Tick the boxes for Read, Write and Execute for each group. The number at the bottom updates by itself. You can also type the number.
  6. Click Change Permissions.
  7. Check your website still works.
    existing permissions

If your site shows an error after a change

  1. Put the old value back.
  2. For a "403 Forbidden" error, set folders to 755 and files to 644.
  3. If it still fails, send a ticket to Hostvento support at https://secure.hostvento.com/submitticket.php.
Tip: Write down the old number before you change it. Then you can go back fast.

Quick recap

  • Permissions say who can read, write or run a file.
  • Use 644 for files and 755 for folders.
  • Avoid 777.
  • Change them with right-click, then Change Permissions, in File Manager.