What does chmod 654
stand for ?
4 Answers
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.
-
3It'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.– JaHeiAug 30, 2010 at 13:37
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!
man chmod
in your shell