chmod 640 filechmod is a Unix command that changes file permissions. Permissions control who can read, write, and execute files.
Each permission has a value: Read=4, Write=2, Execute=1. Add them up for each group (owner/group/other). For example, 755 means owner has full access (4+2+1=7) and others have read+execute (4+1=5).
777 grants full read/write/execute to everyone. It is rarely needed and can be a security risk. Use 644 for files and 755 for directories when possible.