Understanding Unix File Permissions
Unix file permissions control who can read, write, and execute files. Each file has three permission groups: owner (the file creator), group (users in the file's group), and others (everyone else). Each group can have read (r), write (w), and execute (x) permissions.
How Chmod Numbers Work
Each permission has a numeric value: read = 4, write = 2, execute = 1. The chmod number is three digits, one for each group (owner, group, others). Each digit is the sum of permissions for that group. For example, 755 means owner has rwx (7), group has r-x (5), others have r-x (5).
Common Permission Patterns
755 is standard for executable files and directories (owner can modify, others can read/execute). 644 is typical for regular files (owner can modify, others can read only). 600 is used for private files (owner only). 777 grants full access to everyone and should be used with caution.