Question: I was asked in an interview why it is that 777 is assigned to take all permissions for a file. Why not 555? He said that there is reason for everything. So, what is the reason for 777? Why not any other number? Is there any significance in this number?

Answer: 
Reading file permission means `4`, writing file permission means `2` and executing file permission means `1`.

So the total of this is `7`.

Now what is 777: first `7` is for file owner that means file owner have read, right and execute permission. 

2nd `7` is for the group to which the file belongs, it means group also have all the read, write and execute permission.

And 3rd `7` is for others permission

If you give the file permission `555` then the file `owner, group and others` have only `read` and `execute` permission `not write` permission because read permission means 4 and execute means 1 so total gets `5`
For some reason, UNIX designers decided to use [OCTAL numbers](http://en.wikipedia.org/wiki/Octal) for file permissions. As you know, a maximum value for one-digit octal number is 7. It turned out that one octal digit for user access, one for the group access and one for the world access is enough for nearly everything. Maximum 3digit octal number is 777, and it only makes sense that it denotes "access to everybody/everything".