Understanding Unix File Permissions: A Practical Guide
File permissions are one of the first things that trip up developers on Linux and macOS. You get a "Permission denied" error, frantically Google "chmod 777", fix it, and move on — without really un...

Source: DEV Community
File permissions are one of the first things that trip up developers on Linux and macOS. You get a "Permission denied" error, frantically Google "chmod 777", fix it, and move on — without really understanding what happened. This guide gives you a practical understanding of Unix permissions that will save you from both "Permission denied" errors and accidental security holes. Whether you are deploying web applications, managing SSH keys, or scripting server automation, having chmod permissions explained clearly will make you a more effective developer. The Owner / Group / Other Permission Model Every file and directory on a Unix system has three sets of permissions for three classes of users: Owner (u) — the user who owns the file. By default, the user who creates a file becomes its owner. Group (g) — users in the file's group. Every file is assigned to one group, and any user who is a member of that group gets these permissions. Others (o) — everyone else on the system who is neither t