That's a great question! Understanding 644 is very useful because it is the most common permission setting for regular files (like text files or images) on Linux.
Using the same calculation method we just discussed, here is what 644 signifies:
Mapping the Digits:
- 6 (Owner): 4 (Read) + 2 (Write) = 6. You can read and modify the file.
- 4 (Group): 4 (Read) = 4. People in your group can only read it.
- 4 (Others): 4 (Read) = 4. Everyone else can only read it.
What it means in practice:
- The Owner can see what's inside the file and save changes to it.
- Everyone else can open and view the file, but they cannot edit it or delete it.
Difference between Files and Directories:
In the context of the current lab step:
- If you apply
644to a file, it works perfectly for a public document. - If you apply
644to a directory, it can be a bit tricky! Because it lacks the "Execute" (1) permission, users wouldn't be able tocdinto the directory or access files inside it, even if they can "read" the list of filenames. That's why for directories, we usually see755instead of644.
Does that help you see the difference between the 700 we used in the lab and this 644 setting?