In order to use PHP scripts on the hosting (or server), your server should have permissions to access them. This was instituted in order to provide better security measures and not allow malicious code to access to important files.

This permissions are set for each file specifically. In Linux-based operating systems, they are usually referenced as three digit numbers. First digit refers to permissions for server services, second — for common users, third — for guests.

Explanation of numerical permission designation

0 — nothing can be done. File or folder are completely inaccessible.
4 — read only.
2 — write only.
1 — execute only.
5 (4+1) — read and execute.
6 (4+2) — read and write.
7 (4+2+1) — read, write and execute. Full access.

Most of the PHP-scripts should have permissions set to 644. These permissions are automatically set by the server.

If the script is going to be modified by another script — set the permissions to 666.

If the script is going to create files in a folder — this folder should have permissions set to 777.