What is chmod (file permissions)?
chmod sets who can read, write or run a file on Linux and macOS.
Permissions are given to the owner, the group and others. Read is 4, write is 2 and execute is 1, so 755 means the owner can do everything and others can read and run.
Avoid 777 on servers because anyone can then modify the file.