What are file permissions?
Permissions are rules that say who may do what with a file. Think of a house with keys. Some people can only look. Some can change things. Some can walk in and run things.
Each file has three kinds of users:
- Owner: you, the account owner.
- Group: a set of users on the same server.
- World: everyone else, including website visitors.
Each user can have three powers: Read (look at the file), Write (change it) and Execute (run it as a program).
Permission numbers
The powers become numbers. Read is 4, Write is 2, Execute is 1. You add them up for each user. A permission such as 644 has three digits, one for owner, group and world.
| Number | Meaning | Common use |
|---|---|---|
| 644 | Owner reads and writes. Others only read. | Normal website files |
| 755 | Owner does everything. Others read and run. | Folders |
| 600 | Only the owner reads and writes. | Private config files |
| 777 | Everyone can do everything. | Avoid. It is unsafe. |
Steps
- Log in to cPanel and open File Manager.
- Go to the folder that holds the file.
- Right-click the file or folder.
- Click Change Permissions.
- Tick the boxes you need, or type the number into the box.
- Click Change Permissions to save.
Check the result in the Permissions column of the file list.
Warning: Do not use
777. It lets anyone on the server change the file, so hackers can use it. If a guide tells you to use it, try 755 or 644 first.Signs of wrong permissions
- "403 Forbidden" error: the permissions may be too strict.
- "500 Internal Server Error": some servers reject folders set looser than 755.
- An upload fails: the target folder may not be writable.
Not sure which setting is right? Open a support ticket and ask Hostvento support.
