What does `-m 700` mean?

QuestionsQuestions8 SkillsProDec, 10 2025
076

In the command mkdir -m 700 ~/project/digital_garden/private, the -m 700 part is used to set specific permissions for the new directory right when it's created.

Let's break down 700:

  • The number 7 refers to the permissions for the owner of the directory.
  • The first 0 refers to the permissions for the group that owns the directory.
  • The second 0 refers to the permissions for others (anyone else).

Each digit is a sum of these values:

  • 4 for read permission (r)
  • 2 for write permission (w)
  • 1 for execute permission (x)

So, 700 means:

  • Owner (7): 4 (read) + 2 (write) + 1 (execute) = rwx (read, write, and execute permissions)
  • Group (0): No permissions (---)
  • Others (0): No permissions (---)

This configuration ensures that only you (the owner) can read, write, or execute anything within the private directory, making it very secure.

You can learn more about file permissions in Linux as you progress, it's a fundamental concept! Let me know if you have more questions.

0 Comments

no data
Be the first to share your comment!