Friday 25 June 2010

what are 777 means in sense of permissions?

Whenever we give permission to the folder or anything, we usually write 777.
Here are three 777.
First seven means permission is giving to User(Owner)
Second seven means permission is giving to Group
Third seven means permission is giving to Others

so 777 means UGO

now comes to each 7. what the means of 7?

each 7 consist read, write or execute permission.

therefore,

read(r)      : 4
write(w)     : 2
execute(x) : 1


Suppose, if we want to give read, write and execute permission then

read + write + execute (rwx) => 4 +2 + 1 => 7
read + write (rw) => 4 + 2 => 6
read + execute (rx) => 4 + 1 => 5
write + execute (wx) => 2+1 => 3

Cheers!

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Nice post! If I have a website at a webhosting company, does that mean my website is on a shared server? I have a few questions:

    1.What permission do I need when I want only registered users to write/read/execute? 770?
    2.What permission do I need when I let unregistered users to write/read/execute as well? 777?
    3. If I want the users to upload an image to the folder then I display that image in an image control, do they need only a write permission to the folder? In that case, if I let registered and unregistered users to upload images, does that mean a 444 permission? What if the image can be overwritten (the same file already exists)? Is a 555 then?

    I am a bit confused about permissions.

    ReplyDelete