For each file, read, write, and execute permissions are assigned in three separate sets:
Permissions for the owner (user) of the file
Permissions for the group that the file belongs to
Permissions for all others
File permission metaphor
You might think of the UNIX file permissions like an apartment building that you live in. There are common areas that everyone in the building has access to—the hallways, the laundry room, etc. That’s:
rw-rw-rw-
Then there’s your apartment, which you share with your family or roommates:
rw-rw----
And then there’s your room, which is yours alone:
rw-------
Whether or not you can read , write, or execute a file depends on which of these sets you belong to: whether you own the file, belong to its group, or fall into the band of riffraff known as “other.”