1

What does chmod 654 stand for ?

1

4 Answers 4

13

From http://en.wikipedia.org/wiki/File_system_permissions#Octal_notation:

0 --- no permission
1 --x execute 
2 -w- write 
3 -wx write and execute
4 r-- read
5 r-x read and execute
6 rw- read and write
7 rwx read, write and execute

First number represents the owner, second the group and the third everyone. So 654 would mean read and write for owner, read and execute for group and only read for everyone else.

1
  • 3
    It's simple math really, and pretty handy to know in some cases. Execute is 1, write is 2, read is 4. The resulting permissions are additions of these three. Maybe it was clear from that table, but I myself didn't really think of it at first. Voting up your answer.
    – JaHei
    Aug 30, 2010 at 13:37
1

It stands for -rw-r-xr--. See also the chmod man pages.

1

As others have said, it's rw-r-xr--, which gets stored as a series of bits, 110101100. Split that into user, group, owner blocks and you get 110 101 100. Representing those binary numbers as octal gets you 6 5 4. Tada!

0
1

Change permissions to rw-r-xr--.

Here's a chmod calculator:

http://www.happytec.at/tools/chmod.php

You must log in to answer this question.