Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Doing chomod 755 on a directory gives me drwxr-xr-x. Should it not give me drwxr-xr-xr since 5 is read,execute?

And Doing chmod 751 on a directory give me drwxr-x--x. Should that not give me drwxr-xr-x?

Kindly explain.

share|improve this question

migrated from stackoverflow.com Feb 15 '11 at 10:14

This question came from our site for professional and enthusiast programmers.

The bits are groups of three the results are correct, I do not really get the point you misunderstood. 5 is read, execute but the order of rwx does not change. Consider them as switches, they might be on (r/w/x) or off (-). Here again an overview of the values:

7(8) = 111(2) => rwx
5(8) = 101(2) => r-x
1(8) = 001(2) => --x
share|improve this answer
    
it is clear to me now. thank you. – Anonymous Feb 14 '11 at 20:54

You must log in to answer this question.