TRN
07-30-2003, 08:39 PM
Do you easily get confused with file and directory permissions? When someone says a file should be 644 do you look at it cross eyed? Well, simply add up the values for read, write, and execute and you have the values for those three numbers.
6 4 4
The three numbers are for the owner, group, other respectively.
Read value=4
Write value=2
Execute value=1
Simply add up the values and this is the number. So, read only would be a value of 4; read and write is 6 (4+2); whereas giving complete read, write, and execute rights is 7 (4+2+1).
So, if you are told to give a file permissions of 644 then you know you are giving read and write access to the owner; and read only to the group and other.
Pretty easy, eh?
6 4 4
The three numbers are for the owner, group, other respectively.
Read value=4
Write value=2
Execute value=1
Simply add up the values and this is the number. So, read only would be a value of 4; read and write is 6 (4+2); whereas giving complete read, write, and execute rights is 7 (4+2+1).
So, if you are told to give a file permissions of 644 then you know you are giving read and write access to the owner; and read only to the group and other.
Pretty easy, eh?