On Thu, 9 Sep 2004 12:37:21 -0500 Danny Sauer <suse-linux-e.suselists@danny.teleologic.net> wrote:
Chadley wrote regarding '[SLE] octal permission mode' on Thu, Sep 09 at 08:24:
Greetings,
In my studies I have come across octal permision mode with the find command. What on earth does it do, mean, refer to ?
The section is as follows find -perm mode : List file with the octal permission mode
I can find a decent understandable answer in the man pages or google.
It says that because the file permissions are specified using a number represented in octal - base 8. There are three bits for each of the four permission groups, each of which can be on or off - AKA 1 or 0. Three positions with 2 possiblities each gives 2^3, or 8. Hence, octal is the most convenient way to group the 4 sets of three binary digits. octal 0755 = binary 000111101101 = "ls output" ---rwxr-xr-x. It could just as easily be hexadecimal (1ED) or decimal (493), but the base-8 system is a lot handier for human use.
If you've ever done a "chmod 0755 ~/public_html" then you've seen octal permission modes - the 0755 in there. Like everyone else said, "man chmod" th figure out exactly what each bit means.
I just want to add to this: As mentioned above, the file permissions are stored effectively as 3 groups of 3 bits representing read-write-execute. The octal code as mentioned above is used to easily refer to bits: Octal Binary 0 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111 So, instead of having to deal with binary directly, the octal system was used. -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9